Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

IEDTREN - Modify the line number

&pagelevel(4)&pagelevel

This access function is used to modify the line number of a record in a work file.

EDTKEY1:       Line number that is to be modified

EDTKEY2:       New line number

If a record with the new line number already exists or if the work file contains further records between the old and new line numbers then the function is not executed.

Call

The following specifications are required (see overview):

  • Entry of values in the required fields in the EDTGLCB and EDTAMCB control blocks.

  • Entry of values in the EDTKEY1 buffer

  • Entry of values in the EDTKEY2 buffer

  • Call of the entry point address IEDTREN with the parameter list

Overview

(For the control blocks, see section “Generation and structure of the control blocks”).

Entry point address     :     IEDTREN

Parameter list         :     A (EDTGLCB, EDTAMCB, EDTKEY1, EDTKEY2)

Call parameter

Return parameter

EDTGLCB:EGLUNIT
EGLVERS
EDTGLCB:EGLRETC
EGLRMSG
EDTAMCB:EAMUNIT
EAMVERS
EAMFILE
EAMLKEY1
EAMLKEY2


EDTKEY1
EDTKEY2


 


For the possible return codes, see section “Logical record access functions”.

Call in the C program

Required include files:

#include <stdio.h>

#include <iedtgle.h>

The EDTAMCB control block is declared and initialized as follows:

iedamcb amcb = IEDAMCB_INIT;
char key1[] = "01234000"; 
char key2[] = "00000100";
amcb.length_key1 = amcb.length_key2 = 8;

If, for example, the record with line number 123.4 is the 1st record in work file 1 and is to

receive line number 0.01:

strncpy(amcb.filename,"$1 ",8);

In the C program, the IEDTREN function is called as follows:

IEDTREN(&glcb,&amcb,key1,key2);