The ETDEF macro builds and modifies the parameter that the ETCRE macro uses to build an entry table. The parameter, called the entry table descriptor (ETD), consists of a header, followed by one or more entries, called ETD entries, each one describing a PC routine. The address of the ETD is input to the ENTRIES parameter on the ETCRE macro.
ETDES, ETCRE, ETCON, and ETDIS
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem or Supervisor state |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | PASN=HASN or PASN¬=HASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary |
Serialization: | Not applicable |
Interrupt status: | None |
Locks: | None |
Control parameters: | None |
You need to create an ETD at compile time through TYPE=INITIAL, TYPE=ENTRY, and TYPE=FINAL parameters and initialize the information for the entries at execution time through TYPE=SET,ETEADR. Therefore, ETDEF with the TYPE=INITIAL, TYPE=ENTRY, and TYPE=FINAL parameters works like a list form of the macro. However, unlike the execute form of a macro, which changes only the values you specify, the TYPE=SET form of ETDEF completely replaces the variable fields of an ETD entry, taking the default values for any parameters you omit, and leaves constant fields as initialized. This information describes the two forms separately.
Although ETDEF is the preferred programming interface, if you have an existing ETD and you want to update the parameters (for example, change the user parameter), you might choose to use the IHAETD mapping macro instead of ETDEF. If you change an existing ETD, without using any of the function of MVS/SP Version 3, you can use IHAETD with the format number of “0”. The format of IHAETD is in z/OS MVS Data Areas in the z/OS Internet library under "ETD".
None.
The ETDEF macro does not use any registers, except for those you use to specify parameters.
None.
The ETDEF macro with the TYPE=INITIAL, TYPE=ENTRY, and TYPE=FINAL options works like a list form of a macro.
This form is described as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede ETDEF. |
ETDEF | |
␢ | One or more blanks must follow ETDEF. |
TYPE=INITIAL | Valid Parameters: RELATED |
TYPE=ENTRY | Required Parameters: PROGRAM or ROUTINE, AKM |
EKM, ARR, ASCMODE, EAX, EK, PARM1, PARM2, PC, PKM, SASN, SSWITCH, STATE, RELATED, ASYNCH, CANCEL | |
TYPE=FINAL | RELATED |
,AKM=key-list | key-list: List of keys or key ranges where a key is a number 0 - 15. |
,ARR=arr | arr: A-type address, or alphanumeric character string enclosed by single quotation marks. |
,ARRCOND=NO | Default: ARRCOND=NO |
,ARRCOND=YES | Valid only when ARR is also coded. |
,ASYNCH=YES | Default: ASYNCH=YES |
,ASYNCH=NO | Valid only when ARR is also coded. |
,CANCEL=YES | Default: CANCEL=YES |
,CANCEL=NO | Valid only when ARR is also coded. |
,ASCMODE=PRIMARY | Default: ASCMODE=PRIMARY |
,ASCMODE=AR | |
,EAX=eax-value | eax-value: Half-word decimal digit. |
,EK=entry-key | entry-key: Decimal digit 0 - 15. |
,EKM=key-list | key-list: List of keys or key ranges where a key is a number 0 - 15. |
Note: EKM is required with PKM=REPLACE. | |
,PARM1=user-parm1 | user-parm1: A-type address or string of up to 4 characters enclosed by single quotation marks. |
,PARM2=user-parm2 | user-parm2: A-type address or string of up to 4 characters enclosed by single quotation marks. |
,PC=STACKING | Default: PC=STACKING |
,PC=BASIC | |
,PROGRAM=pgm-name | pgm-name: String of up to 8 alphanumeric characters, optionally enclosed by single quotation marks. |
,ROUTINE=rtn-addr | rtn-addr: A-type address. |
,PKM=OR | Default: PKM=OR |
,PKM=REPLACE | |
,RAMODE=31 | Default: RAMODE=31 |
,RAMODE=24 | |
,RAMODE=64 | |
,RELATED=value | value: Any valid macro parameter specification. |
,SASN=OLD | Default: SASN=OLD |
,SASN=NEW | |
,SSWITCH=NO | Default: SSWITCH=NO |
,SSWITCH=YES | |
,STATE=PROBLEM | Default: STATE=PROBLEM |
,STATE=SUPERVISOR | |
The parameters are described as follows:
ARRCOND=NO, indicates that the ARR is not conditional, which means that the system follows the rules described in "Using ARRs" found in z/OS MVS Programming: Authorized Assembler Services Guide with respect to recording in LOGREC error recording if the ARR is skipped. ARRCOND=YES indicates that no recording in LOGREC error recording is to occur if the ARR is skipped.
Use ARRCOND=YES to avoid having to provide two PCs, one without an ARR for use in an FRR environment, and one with an ARR for use when not in an FRR environment.
ARRCOND is valid only with ARR.
Addressability to the latent parameter area is through the current primary address space. The latent parameter address is set in general register 4 as a result of the PC instruction, although AR4 is unchanged by the PC instruction. If the PC routine runs in AR mode, set the access register corresponding to the latent parameter area to zero before the PC routine attempts to use it.
Addressability to the latent parameter area is through the current primary address space. The latent parameter address is set in general register 4 as a result of the PC instruction, although AR4 is unchanged by the PC instruction. If the PC routine runs in AR mode, set the access register corresponding to the latent parameter area to zero before the PC routine attempts to use it.
When you specify ROUTINE, you can indicate the AMODE of the PC routine with the RAMODE parameter. When you specify PROGRAM, the system locates the PC routine and determines its AMODE.
On TYPE=ENTRY or TYPE=SET,ETEADR, either PROGRAM or ROUTINE is required.
An example of using the ETDEF macro follows the description of the TYPE=SET parameter.
The ETDEF macro with the SET parameter works similarly to the execute form of a macro with this important distinction: The TYPE=SET form totally replaces all variables in an ETD entry and takes default values for all parameters you omit. The normal execute form of a macro changes only the values you specify.
Constants and reserved fields that are initialized by other TYPE= forms are not updated or changed. To create an entry table in a storage area that is not initialized (for example, one just allocated through a GETMAIN request), you must first move a complete entry table of the proper (or larger) size to that area. The formatted table will provide the constants and indexes. Then, you can use ETDEF TYPE=SET to change the required entry's variable parameters.
The form of SET is described as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede ETDEF. |
ETDEF | |
␢ | One or more blanks must follow ETDEF. |
TYPE=SET,ETEADR=entry-addr | Required Parameters: PROGRAM or ROUTINE, AKM |
Valid Parameters: EKM, ARR, ASCMODE, EAX, EK, PARM1, PARM2, PC, PKM, RAMODE, SASN, SSWITCH, STATE, RELATED, ASYNCH, CANCEL | |
entry-addr: RX-type address or register (1) - (15). | |
TYPE=SET,HEADER=header-addr | Required Parameter: NUMETE |
Valid Parameter: RELATED | |
header-addr: RX-type address or register (1) - (15). | |
,AKM=key-list | key-list: List of keys or key ranges where a key is a decimal digit 0 - 15. |
,ARR=arr | arr: A-type address, register (2)-(12), or alphanumeric character string, enclosed by single quotation marks. |
,ARRCOND=NO | Default: ARRCOND=NO |
,ARRCOND=YES | Valid only when ARR is also coded. |
,ASYNCH=YES | Default: ASYNCH=YES |
,ASYNCH=NO | Valid only when ARR is also coded. |
,CANCEL=YES | Default: CANCEL=YES Valid only when ARR is also coded. |
,CANCEL=NO | |
,ASCMODE=PRIMARY | Default: ASCMODE=PRIMARY |
,ASCMODE=AR | |
,EAX=eax-value | eax-value: Half-word decimal digit or register (2)-(12) |
,EK=entry-key | entry-key: Decimal digit 0 - 15. |
,EKM=key-list | key-list: List of keys or key ranges where a key is a decimal digit 0 -15. |
Note: EKM is required with PKM=REPLACE. | |
,NUMETE=nbr-of-entries | nbr-of-entries: 2-byte A-type address, decimal number, or register (2)-(12). |
Note: NUMETE is required with HEADER. | |
,PARM1=user-parm1 | user-parm1: A-type address, register (2)-(12), or string of up to 4 characters enclosed by single quotation marks. |
,PARM2=user-parm2 | user-parm2: A-type address, register (2)-(12), or string of up to 4 characters enclosed by single quotation marks. |
,PC=STACKING | Default: PC=STACKING |
,PC=BASIC | |
,PROGRAM=pgm-name | pgm-name: String of up to 8 alphanumeric characters, optionally enclosed by single quotation marks. |
,ROUTINE=rtn-addr | rtn-addr: A-type address or registers (2)-(12) |
,PKM=OR | Default: PKM=OR |
,PKM=REPLACE | |
,RAMODE=31 | Default: RAMODE=31 |
,RAMODE=24 | |
,RAMODE=64 | |
,RELATED=value | value: Any valid macro parameter specification. |
,SASN=OLD | Default: SASN=OLD |
,SASN=NEW | |
,SSWITCH=NO | Default: SSWITCH=NO |
,SSWITCH=YES | |
,STATE=PROBLEM | Default: STATE=PROBLEM |
,STATE=SUPERVISOR | |
The parameters are described under the TYPE=INITIAL, TYPE=ENTRY, and TYPE=FINAL options, with the following exceptions:
ARRCOND=NO, which is the default, indicates that the ARR is not conditional, which means that if the system skips the ARR because of an incorrect environment, that fact is recorded in LOGREC error recording.
ARRCOND=YES indicates that if the system skips this ARR, that fact will not be recorded in LOGREC error recording. Use ARRCOND=YES to avoid having to provide two PCs, one without an ARR for use in an FRR environment, and one with an ARR for use when not in an FRR environment.ARRCOND is valid only with ARR.
None.
None.
MYPGM CSECT
BALR 12,0
USING *,12
LOAD EP=PCPGM
LR 2,0
ETDEF TYPE=SET,HEADER=MYETDS,NUMETE=3
ETDEF TYPE=SET,ETEADR=FIRST,ROUTINE=(2),AKM=8
ETCRE ENTRIES=MYETDS
RETURN
.
.
.
* DATA DEFINITIONS FOR PROGRAM
.
MYETDS ETDEF TYPE=INITIAL
FIRST ETDEF TYPE=ENTRY,ROUTINE=0,AKM=8
SECOND ETDEF TYPE=ENTRY,PROGRAM=OTHERTN,AKM=0:15
THIRD ETDEF TYPE=ENTRY,ROUTINE=PCRTN,AKM=0
FOURTH ETDEF TYPE=ENTRY,ROUTINE=0,AKM=0
ETDEF TYPE=FINAL
*
*
PCRTN DS 0H
.
.
* PC ROUTINE CODE
.
.
END MYPGM
Note that the combination of TYPE=INITIAL, ENTRY, and FINAL is essentially the list form of the macro and TYPE=SET is the execute form.