Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

IEDTPTM - Mark a record

&pagelevel(4)&pagelevel

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 to EAMMK09 in EDTAMCB) are available to users without restriction. They can modify these marks using the functions
    IEDTPUT (write record and mark) and IEDTPTM (write record mark).
    These marks can also be set or deleted using statements ( statement codes).

  • Record mark 13 (EAMMK13 in EDTAMCB) has the special function of an ignore indicator. Records marked in this way are

    • automatically 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 and IEDTPTM if the flag EAMIGN13 is set in the field EAMFLAG in the control block EDTAMCB.

  • Record mark 14 (EAMMK14 in EDTAMCB) 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 in EDTAMCB) 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 code X 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 and EDTAMCB control blocks.

  • Entry of values in the EDTKEY buffer

  • Call 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     :     IEDTPTM

Parameter list         :     A (EDTGLCB, EDTAMCB, EDTKEY)

Call parameter

Return parameter

EDTGLCB:EGLUNIT
EGLVERS
EDTGLCB:EGLRETC
EGLRMSG
EDTAMCB:EAMUNIT
EAMVERS
EAMFLAG
EAMFILE
EAMMARK
EAMLKEY


EDTKEY


 


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);