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 (
EAMMK01toEAMMK09inEDTAMCB) 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 (
EAMMK13inEDTAMCB) 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
IEDTGETandIEDTPTMif the flagEAMIGN13is set in the fieldEAMFLAGin the control blockEDTAMCB.
Record mark 14 (
EAMMK14inEDTAMCB) 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 (
EAMMK15inEDTAMCB) 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 codeXor [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
EDTGLCBandEDTAMCBcontrol blocks.Entry of values in the
EDTKEYbufferCall of the entry point address
IEDTPTMwith 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);