Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Logical record access functions

&pagelevel(3)&pagelevel

The logical record access functions allow users to access records in the work files from within a user program.

The following access functions are available:

Access functions

Entry point address

Read a record

IEDTGET

Read a marked record

IEDTGTM

Write a record

IEDTPUT

Mark a record

IEDTPTM

Delete the copy buffer or a record range

IEDTDEL

Modify a line number

IEDTREN

Read the global EDT parameter settings

IEDTGET

Read the work file-specific EDT parameter settings

IEDTGET

The individual access functions are described in the sections below.

Access functions can only be executed if EDT is initialized. Initialization is performed by calling the function IEDTCMD (see section “IEDTCMD - Execute EDT statements”).

If the call is issued in a statement or user routine with the supplied EDTGLCB, then EDT is already initialized.

If access functions are used with a work file which is already active and is being processed as a procedure with @DO then they are rejected with the return code EAMACERR/EAMAC48 (work file is active).

Processing files and library elements

The logical record access functions always apply to the records in a work file. If it is necessary to process files or library elements then these must first be read into a work file (e.g. with the function IEDTCMD). A file can also be opened for real processing. These files or elements are then written back using EDT statements (e.g. with the function IEDTCMD).

Each record has a line number via which it can be accessed.
Each record may also have various marks (see [1], section on record marks).

Control structures

Before a record access function is called, the required control blocks must have been declared in the calling program and, if necessary, defined and filled with the required values.

Return codes of the record access functions

The table indicates the return codes which EDT can set for the individual access functions. In this table, GET stands for IEDTGET etc.

Return code

Function

EGLMRET

EGLRS1

GET

GTM

PUT

PTM

REN

DEL

EAMRETOKEAMOK00
EAMOK04
EAMOK08
EAMOK12
x
x
x
x
x
x
x
x
xxxx

EAMOK16
EAMOK20





x
x
EAMACERREAMAC04

x



EAMAC08
EAMAC12
x
x
x
x





EAMAC16
EAMAC20
xx
x

xx
x
x

EAMAC28
EAMAC32

xxx
x



EAMAC36
EAMAC40
EAMAC44




x
x
x


EAMAC48xxxxxx
EAMEDERR
EAMOSERR
EAMUSERR

x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
EAMPAERR

EAMPA04
EAMPA08
EAMPA12
EAMPA20
EAMPA24

x
x
x
x
x

x
x
x
x
x

x
x
x
x
x

x
x
x
x
x

x
x
x
x
x

x
x
x
x
x


EAMPA28

x



EAMPA32
EAMPA36
EAMPA40
EAMPA44
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x

The fields EGLMRET and EGLRS1 belong to the control block EDTGLCB. For the meaning of the return codes, see section “EDTGLCB - Global EDT control block”.