GSYSELEM reads the value of a system variable and interprets it as a member specification (library, member name, version and type).
The library (library or link name), member type and version may be predefined (non-blank value). If any of these components is left unspecified in the system variable (or is assigned the default value *BY-PROGRAM), it defaults to its predefined value when the function returns. It is an error for there to be no explicit value and no default value. Default values must be defined in the standard format for the subroutine (for example, for the highest available version: X’FF’ and at least one blank).
System variable names must be specified in the NAME field of the ED structure. The subroutine looks first for a procedure-local system variable by that name, then for a taskglobal system variable by that name.
If the return code is anything other than LMSOK (X ́00 ́), the fields in ED and LD are left unchanged.
Syntax of contents of system variables (lowercase is not converted to uppercase and is treated as syntactically invalid):
|
Call parameters
The parameter structures must be given in the following sequence in the subroutine call.
Parameter | Field | Meaning |
CB | SCBVERSION FUNCTION SUBCODE ACC | Function control block Interface version Function code X'1F' Subcode currently not used: UNUSE Subroutine access identification |
LD | LINK | Library descriptor (poss. predefined) Link name |
ED | TYP | Member descriptor Member type (poss. predefined) |
Return parameters
Parameter | Field | Meaning |
CB | RETURNCODE LMS-MSG | Function control block Return code LMS message code |
LD | LINK MAX-NAME-LEN NAME | Library descriptor Link name Maximum length of library name Library name |
ED | TYP NAME VERSION | Member descriptor Member type Member name Member version |