Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

GSYSELEM: read a member specification from a system variable

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


*LIBRARY-ELEMENT(...)



|

LIBRARY = *BY-PROGRAM / <full-filename 1..54 without-vers> / *LINK(...)



|


*LINK(...)



|



|

LINK-NAME = <structured-name 1..8>



|

,ELEMENT = <composed-name 1..64 with-under>(...)



|


<composed-name 1..64 with-under>(...)



|



|

VERSION = *BY-PROGRAM / *HIGHEST-EXISTING / *UPPER-LIMIT /



|



|


<composed-name 1..24 with-under>



|

,TYPE = *BY-PROGRAM / <alphanum-name 1..8>

Call parameters

The parameter structures must be given in the following sequence in the subroutine call.

Parameter
structure

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
MAX-NAME-LEN
NAME

Library descriptor (poss. predefined)

Link name
Maximum length of library name
Library name (poss. predefined)

ED


TYP
NAME
VERSION

Member descriptor

Member type (poss. predefined)
Name of S variable 
Member version (poss. predefined)

Return parameters

Parameter
structure

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