Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

EDTGLCB - Global EDT control block

&pagelevel(4)&pagelevel

EDTGLCB represents the global control block in all EDT program interfaces. It is used by the IEDTGLE interface as well as by the @USE and @RUN interface.

Creating the EDTGLCB control block

The IEDTGLCB Assembler macro is used to create the EDTGLCB control block.

Name

Operation

Operands

[name]

IEDTGLCB

[ {  D  | C } ] [,prefix] [,VERSION= {  1  | 2 } ]

name

– Symbolic name of the first DS statement when C is specified.
DSECT name if D is specified.

If name is not specified then EDTGLCB is used (preceded by prefix if
specified).

D

C

A dummy section (DSECT) is generated.

A memory section with symbolic addresses is generated (no CSECT
statement).

prefix

A character with which the generated field names should start.

If prefix is not specified, E is used by default.

VERSION

Selects which version of the control block is to be generated:

Version 1 is used with the V16 format of the interface.
Version 2 is used with the V17 format of the interface.

If the macro IEDTGLCB VERSION=2 is specified then the EDTGLCB control block is generated in the following form:

           IEDTGLCB D,VERSION=2
1 EDTGLCB  MFPRE DNAME=EDT,MF=D
2 EDTGLCB  DSECT ,
2                *,##### PREFIX=I, MACID= #####
1 *--------------- EDT UNIT NUMBER, EDTGLCB VERSION NUMBER --------------
1 EGLUNITC EQU   66                  EDT UNIT NUMBER
1 EGLVERSC EQU   2                   EDTGLCB VERSION NUMBER
1 EGLVERSL EQU   12                  VERSION-LENGTH (INFO)
1 EGLMSGM  EQU   80                  MAX LENGTH FOR MESS
1 *--------------- EDT MAIN-RETURNCODES ---------------------------------
1 *                     *------ EDT-CALL --------------------------------
1 EUPRETOK EQU   X'0000'             NO ERROR
1 EUPSYERR EQU   X'0008'             SYNTAX ERROR IN COMMAND
1 EUPRTERR EQU   X'000C'             RUNTIME ERROR IN COMMAND
1 EUPEDERR EQU   X'0010'             UNRECOVERABLE EDT ERROR
1 EUPOSERR EQU   X'0014'             UNRECOVERABLE SYSTEM ERROR
1 EUPUSERR EQU   X'0018'             UNRECOVERABLE USER ERROR
1 EUPPAERR EQU   X'0020'             PARAMETER ERROR
1 EUPSPERR EQU   X'0024'             REQM ERROR
1 EUPVEERR EQU   X'0028'             VERSION ERROR                  V16.5
1 EUPABERR EQU   X'002C'             ABNORMAL HALT BY USER          V16.5
1 EUPCMPER EQU   X'0030'             COMPATIBILITY VIOLATION        V17.0
1 *                     *------ EDT-ACCESS-METHOD -----------------------
1 EAMRETOK EQU   X'0000'             NO ERROR
1 EAMACERR EQU   X'0004'             ACCESS ERROR
1 EAMEDERR EQU   X'0010'             UNRECOVERABLE EDT ERROR
1 EAMOSERR EQU   X'0014'             UNRECOVERABLE SYSTEM ERROR
1 EAMUSERR EQU   X'0018'             UNRECOVERABLE USER ERROR
1 EAMPAERR EQU   X'0020'             PARAMETER ERROR
1 EAMSPERR EQU   X'0024'             REQM ERROR
1 *--------------- EDT SUB-RETURNCODE1 ----------------------------------
1 *                     *------ MAIN: EUPRETOK --------------------------
1 EUPOK00  EQU   X'00'               NO ERROR
1 EUPOK04  EQU   X'04'               HALT
1 EUPOK08  EQU   X'08'               HALT <TEXT>
1 EUPOK12  EQU   X'0C'               RETURN
1 EUPOK16  EQU   X'10'               RETURN <TEXT>
1 EUPOK20  EQU   X'14'               K1-KEY
1 EUPOK24  EQU   X'18'               IGNORE COMMAND
1 *                     *------ MAIN: EUPPAERR --------------------------
1 EUPPA04  EQU   X'04'               ERROR IN EDTGLCB
1 EUPPA08  EQU   X'08'               ERROR IN EDTUPCB
1 EUPPA12  EQU   X'0C'               ERROR IN COMMAND PARAMETER
1 EUPPA16  EQU   X'10'               ERROR IN MESSAGE PARAMETER
1 EUPPA20  EQU   X'14'               ERROR IN CCSN                  V17.0
1 EUPPA24  EQU   X'18'               CONVERSION ERROR               V17.0
1 *                     *------ MAIN: EUPVEERR --------------------------
1 EUPVE00  EQU   X'00'               STANDARD VERSION RETURNED
1 EUPVE04  EQU   X'04'               NO VERSION RETURNED
1 *                     *------ MAIN: EAMRETOK --------------------------
1 EAMOK00  EQU   X'00'               NO ERROR
1 EAMOK04  EQU   X'04'               NEXT RECORD RETURNED
1 EAMOK08  EQU   X'08'               FIRST RECORD RETURNED
1 EAMOK12  EQU   X'0C'               LAST RECORD RETURNED
1 EAMOK16  EQU   X'10'               FILE CLEARED
1 EAMOK20  EQU   X'14'               COPY BUFFER CLEARED            V16.6
1 *                     *------ MAIN: EAMACERR --------------------------
1 EAMAC04  EQU   X'04'               PUT RECORD TRUNCATED
1 EAMAC08  EQU   X'08'               KEY TRUNCATED ( MOVE MODE )
1 EAMAC12  EQU   X'0C'               RECORD TRUNCATED (MOVE MODE )
1 EAMAC16  EQU   X'10'               FILE IS EMPTY
1 EAMAC20  EQU   X'14'               NO MARKS IN FILE
1 EAMAC24  EQU   X'18'               FILE NOT OPENED (NO LONGER USED)
1 EAMAC28  EQU   X'1C'               FILE REAL OPENED (NO MARKS)
1 EAMAC32  EQU   X'20'               PTM NOT FOUND
1 EAMAC36  EQU   X'24'               REN KEY ERROR
1 EAMAC40  EQU   X'28'               MAX LINE ERROR
1 EAMAC44  EQU   X'2C'               RENUMBER INHIBITED
1 EAMAC48  EQU   X'30'               FILE IS ACTIVE
1 *                     *------ MAIN: EAMPAERR --------------------------
1 EAMPA04  EQU   X'04'               ERROR IN EDTGLCB
1 EAMPA08  EQU   X'08'               ERROR IN EDTAMCB
1 EAMPA12  EQU   X'0C'               FILENAME ERROR
1 EAMPA16  EQU   X'10'               ACCESS FUNCTION ERROR
1 EAMPA20  EQU   X'14'               KEY FORMAT ERROR
1 EAMPA24  EQU   X'18'               KEY LENGTH ERROR
1 EAMPA28  EQU   X'1C'               RECORD LENGTH ERROR
1 EAMPA32  EQU   X'20'               WRONG TRANSFER MODUS BYTE
1 EAMPA36  EQU   X'24'               WRONG VERSION OR UNIT NUMBER
1 EAMPA40  EQU   X'28'               ERROR IN CCSN                  V17.0
1 EAMPA44  EQU   X'2C'               CONVERSION ERROR               V17.0
1 *--------------- CONTROL BLOCK EDTGLCB --------------------------------
1 *                       *---- CONTROL BLOCK HEADER --------------------
1 EGLFHE   DS    0XL8                GENERAL OPERAND LIST HEADER
1 EGLIFID  DS    0A                  INTERFACE IDENTIFIER
1 EGLUNIT  DC    AL2(XGLUNITC)       UNIT NUMBER
1          DS    AL1                 RESERVED
1 EGLVERS  DC    AL1(XGLVERSC)       FUNCTION INTERFACE VERSION NUMBER
1 *                       *--- RETURN CODE ------------------------------
1 EGLRETC  DS    0A                  GENERAL RETURN CODE
1 EGLSRET  DS    0AL2                SUB RETURN CODE
1 EGLSR2   DC    AL1(0)              SUB RETURN CODE2
1 EGLSR1   DC    AL1(0)              SUB RETURN CODE1
1 EGLMRET  DC    AL2(0)              MAIN RETURN CODE
1 *                       *---- RETURN MESSAGE FIELD --------------------
1 EGLINFM  DS    0F                  INFORMATION OF MEMORY SIZE
1 EGLCMDS  DC    F'0'                DISPLACEMENT OF INVALID COMMAND
1 EGLRMSG  DS    0CL82               EDT RETURN MESSAGE
1 EGLRMSGL DC    H'0'                MESSAGE LENGTH
1 EGLRMSGF DC    CL80' '             MESSAGE FIELD
1 *                       *---- EDT GLOBAL PARAMETERS -------------------
1 EGLCDS   DC    X'00'               CODE OF SENDING KEY            V16.4
1 EGLDUE   EQU   X'66'               DUE
1 EGLF1    EQU   X'5B'               F1
1 EGLF2    EQU   X'5C'               F2
1 EGLF3    EQU   X'5D'               F3
1 EGLK1    EQU   X'53'               K1
1 EGLINDB  DC    X'00'               INDICATOR BYTE
1 EGLCOMP  EQU   X'80'               COMPATIBLE/EXTENDED FORMAT     V17.0
1 EGLILCS  EQU   X'40'               ILCS ENVIRONMENT               V17.0
1 EGLSPL   EQU   X'10'               EDT CALL FROM SPL
1 EGLSTXIT EQU   X'08'               EDT STXIT ALLOWED              V16.4
1 EGLINIT  EQU   X'04'               EDT DATA INITIATED
1 EGLDTVD  EQU   X'02'               EDT DATA ADDRESS VALID
1 EGLETVD  EQU   X'01'               EDT ENTRY ADDRESS VALID
1 EGLENTRY DC    A(0)                EDT ENTRY ADDRESS
1 EGLDATA  DC    A(0)                EDT DATA ADDRESS
1 *                       *---- ACTIVE EDT-FILE (OUTPUT)----------------1
 EGLFILE  DC    CL8' '              INTERN FILENAME
1 *                       *---- USER PARAMETERS -------------------------
1 EGLUSR1  DC    XL4'00000000'       USER PARAMETER1 (EDT CALLER    )
1 EGLUSR2  DC    XL4'40404040'       USER PARAMETER2 (SUBROUTINE    )
1 EGLUSR3  DC    XL4'40404040'       USER PARAMETER3 (EXIT ROUTINE  )
1 *                       *---- CHARACTER SET ---------------------------
1 EGLCCSN  DC    CL8' '              CODED CHARACTER SET NAME       V17.0
1 EGLIND2  DC    X'00'               INDICATOR BYTE 2               V17.0
1 EGLCMOD  EQU   X'80'               COMP MODE RUNNING              V17.0
1 EGLRES   DC    X'000000'           RESERVED                       V17.0
1 *--------------- LENGTH OF CONTROL BLOCK ------------------------------
1 EGLGLCBL EQU   *-EDTGLCB

Meaning of the control block fields

Length
(bytes)

Format

Parameter type

Call

Return

EGLUNIT

Unique identification of EDT.

2

X

A(M)


EGLVERS

Control block version number.

1

X

C(M)


EGLSR1

SUBCODE1: Subvalue of the return code,
unique within the main value.

1

X


R

EGLSR2

SUBCODE2: Subvalue of the return code,
unique within the main value.

1

X


R

EGLMRET

MAINCODE: Main value of the return code. The
individual return codes are explained in more
detail on "EDTGLCB - Global EDT control block "ff.

2

X


R

EGLCMDS/
EGLINFM

In the case of a syntax error, this field contains
the offset of the invalid statement from the
start of the statement sequence (IEDTCMD and
IEDTEXE functions).
In the case of the IEDTINF function, EDT
always enters 0 for the EGLINFM field.

4

X


R

EGLRMSGL

Length of the message in EGLRMSGF. If no
message is passed then the field has the
value zero.

2

X

C

R

EGLRMSGF

EDT passes an (error) message to the user
program in this field.

80

P

C

R

EGLCDS

In this field, EDT informs an application filter of
the send key with which the statement was
transmitted in F mode dialog.

EGLDUEDUE key
EGLF1F1 function key
EGLF2F2 function key
EGLF3F3 function key

EGLK1

K1 function key

For the values for other function keys, see [18].

1

X


R

EGLINDB

The indicator byte contains flags with various
meanings.

1




Flag
EGLCOMP

The function call should be restricted to the
compatible format:
not set (default): The extended V17 format is
used.
set: The compatible V17 format is used. See
also section 2.1.3 (Interface formats and operating modes ).



C


Flag
EGLILCS

This flag (ILCS flag) should be set if EDT is
called from within a C main program (see
section 6.1 (Producing main programs in C ) onwards). If EDT V16 is called with
the compatible V17 format then this flag is
ignored.



C


Flag
EGLSPL

This flag (SPL flag) must be set if EDT is called
from within an SPL environment.



C


Flag
EGLSTXIT

This flag must be set if the EDT interrupt
routines are to be activated during the call. It
is only activated if the call is performed via the
IEDTCMD and IEDTEXE interfaces.



C


Flag
EGLINIT

This flag is set by EDT after initialization and is
deleted when EDT terminates.



D(M)

R

Flag
EGLDTVD

This flag is set by EDT after initialization and is
deleted when EDT terminates.



D(M)


Flag
EGLETVD

This flag is set by EDT after initialization. It
continues to be set after EDT has terminated.



D(M)


EGLFILE

EDT enters the number of the current work file
($0..$22) in this field (left-aligned) on a return
from the function IEDTCMD. The remainder of
the field is padded with blanks. This also
applies to EDTGLCB for which a statement or
user routine must be specified.

8

P


R

EGLUSR1

In this field, the caller of the
IEDTCMD interface can specify a value which
EDT makes available unchanged to other
users of the IEDTGLE or @USE interface (see
below for details). The field is prefilled with
binary zeros.

4


C

R

EGLUSR2

In this field, a user of the @USE interface can
specify a value which EDT makes available
unchanged to other users of the @USE or
IEDTGLE interface (see below for details). The
field is prefilled with blanks.

4


C

R

EGLUSR3

This field is not currently taken over by EDT.
The content is therefore undefined.

4




EGLCCSN

Name of the character set (possibly padded
with blanks or terminated with X’00’) in which
certain parameters are encoded:
COMMAND, MESSAGE1, MESSAGE2 and EDTREC
(on reading and writing). See the sections on
the statement and record access functions.
If no character set is specified (eight
characters or first character binary zero), then
the character set is determined in accordance
with the rules set out below.

8

P

C


EGLIND2

This field currently contains the EGLCMOD flag.

1




Flag
EGLCMOD

EDT sets this flag if EDT is running in
compatibility mode, that is to say if the control blocks
have been converted back from V16 format.




R

C

(M)

Call parameter

Must be supplied by the caller.

This is set by the macro (when the P parameter is set)
and should not be changed by the user.

D

Call parameter

Must be deleted by the caller on the first call and may not
be subsequently modified.

R

X

P

Return parameter

Binary format

Printable

Supplied by EDT.

Binary digits

Printable texts (in the character set EDF03IRV).


Character set selection if there is no specification in EGLCCSN

For the IEDTCMD and IEDTEXE functions:

  1. If a global character set has been set in EDT, that is to say if the same character set has been set for all the non-empty EDT work files, and this character set is a 7-bit or 8-bit EBCDIC character set then it is used.

  2. If 1) does not make it possible to determine a character set then the character set for the current work file is used provided that this is a 7 or 8-bit EBCDIC character set.

  3. If neither 1) nor 2) makes it possible to determine a character set then the EDF041 character set is used.

For the IEDTGET, IEDTGTM and IEDTPUT functions:

  1. If the work file which is being read from or written to is not empty then this work file's character set is used.

  2. If the work file is empty then the same procedure as for IEDTCMD and IEDTEXE is used.

Treatment of the user parameters

EDT manages global instances of the user parameters EGLUSR1, EGLUSR2 and EGLUSR3. It takes over values from a GLCB supplied by the user into these global instances in the following cases:

  1. The value of EGLUSR1 is taken over if the IEDTCMD interface is called by a user program.

  2. The value of EGLUSR2 is taken over on return to EDT from a user routine (@RUN) or a statement or filter routine (@USE). This also applies on returns from the associated initialization routines.

  3. At present, the value of EGLUSR3 is never taken over.

EDT enters the values of all three global instances in a GLCB in the following cases:

  1. EDT calls a user routine (@RUN) or a statement or filter routine (@USE). This also applies on calls of the associated initialization routines.

  2. EDT returns to a user program after an IEDTCMD or IEDTEXE call.

Changes compared to the V16 format

  • The EGLREOR flag is no longer used.

  • The EGLCOMP flag is new.

  • The EGLILCS flag is new.

  • The EGLCCSN field is new.

  • The EGLIND2 field in combination with the EGLMOD flag is new.

  • The return codes EUPCMPER, EUPPA20, EUPPA24, EAMPA40 and EAMPA44 are new.

Compatible V17 format: the EGLCCSN field may only contain blanks.