GETSYMB (Get Symbolic Parameter) Macro

This macro allows user programs to resolve symbolic parameters.

This is especially useful for JCL exit routines. To resolve symbolic parameters, you first must scan the JCL commands/statements and isolate the symbolic parameters. You then invoke the macro GETSYMB to get the value of a symbolic parameter.

Format

Read syntax diagramSkip visual syntax diagramnameGETSYMB AREA=area( r1),PARMNAM=parmname( r2),VALBUF=valbuf( r3),LENFLD=lenfld( r4)

Requirements for the caller

AMODE:
24 or 31
RMODE:
24 or ANY
ASC Mode:
Primary

Parameters

AREA=area | (r1)
Specifies the address of a 100-byte work area, which is used as control block for saving all information that is related to the macro call.
PARMNAM=parmname | (r2)
Specifies the address of a 7-byte field containing the symbolic parameter name. A name shorter than 7 bytes must start in the leftmost position and the unused bytes must be blank.
VALBUF=valbuf | (r3)
Provides the address of a buffer, which receives the character string that was defined in a previous // SETPARM job control statement for the symbolic parameter. Since this value can be up to 50 characters long, the length of the buffer must be 50 bytes.
LENFLD=lenfld | (r4)
Specifies the address of a 2-byte field where the system provides the length of the value.

For Register Notation

  • Any register from 0 - 15 can be used for AREA.
  • Any register from 2 - 15 can be used for PARMNAM, VALBUF, and LENFLD.

Return Codes in Register 15

Return code 0 in register 15 indicates that the request was successful and that the symbol was found. In this case, register 0 contains an indication in which parameter area the symbol was found:

  • Register 0 contains 1: symbol was found at level n (job or procedure level).
  • Register 0 contains 2: symbol was found at POWER job level.
  • Register 0 contains 3: symbol was found at system job level.
Return code X'10' indicates that the symbol was not found. Registers 13, 14, 15, 0, 1 are destroyed.