This access function can be used to mark a record in a work file or delete its mark.
No records can be marked in a work file in which a file has been opened for real processing by means of @OPEN (Format 2).
Possible record marks:
The record marks 1 to 9 (
EAMMK01
toEAMMK09
inEDTAMCB
) are available to users without restriction. They can modify these marks using the functionsIEDTPUT
(write record and mark) andIEDTPTM
(write record mark).
These marks can also be set or deleted using statements ( statement codes).Record mark 13 (
EAMMK13
inEDTAMCB
) has the special function of an ignore indicator. Records marked in this way areautomatically deleted on return from the user dialog (initiated with @DIALOG or @EDIT ONLY) (see section “IEDTCMD - Execute EDT statements”)
not included when writing to a file or library element
not copied when lines are copied
only taken into account by the record access functions
IEDTGET
andIEDTPTM
if the flagEAMIGN13
is set in the fieldEAMFLAG
in the control blockEDTAMCB
.
Record mark 14 (
EAMMK14
inEDTAMCB
) has the special function of an update indicator. Records marked in this way can be overwritten in F mode even if this is not explicitly requested by the dialog user.Record mark 15 (
EAMMK15
inEDTAMCB
) has the special function of a write protection indicator. Records with record mark 15 are write-protected. In the F mode screen dialog, they cannot be set to overwritable by means of the statement codeX
or [F2].
PROTECTION=ON
must be set using the @PAR statement before it is possible to evaluate record marks 14 and 15.
Record marks 13, 14 and 15 can only be modified by the record access functionsIEDTPUT
and IEDTPTM
but not by means of EDT statements.
Modifying the record in the dialog (i.e. entering data in the data window) deletes record markers 13, 14 and 15.
The line number of the record to be marked must be specified in the EDTKEY
field.
Marks are set as a logical OR
operation. If all the bits (including the undefined bits) in EAMMMARK
are equal to zero then the mark is deleted.
If there is no record with the specified record number then the call is rejected with a return code.
Call
The following specifications are required (see overview):
Entry of values in the required fields in the
EDTGLCB
andEDTAMCB
control blocks.Entry of values in the
EDTKEY
bufferCall of the entry point address
IEDTPTM
with the parameter list
Overview
(For the control blocks, see section “Generation and structure of the control blocks”).
Entry point address |
Parameter list |
Call parameter | Return parameter | ||
EDTGLCB: | EGLUNIT EGLVERS | EDTGLCB: | EGLRETC EGLRMSG |
EDTAMCB: | EAMUNIT EAMVERS EAMFLAG EAMFILE EAMMARK EAMLKEY | ||
|
|
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 key[8]; IEDAMCB_SET_NO_MARKS(amcb); amcb.length_key = 8;
If, for example, a record with line number 123.4 in work file 1 is to be representedas overwritable in F mode (record mark 14):
strncpy(amcb.filename,"$1 ",8); strncpy(key,"01234000",8); MARK_14(amcb) = 1;
In the C program, the IEDTPTM
function is called as follows:
IEDTPTM(&glcb,&amcb,key);