TOCSEC provides information on the member entries in the library specified with LD. An alphabetic search for the member entries (TYP SEC-NAME SEC-ATTRIBUTE NAME VERSION
) is performed in the secondary directory.
A valid TOC identification must be specified in each TOCSEC call so that a subsequent TOC can refer to this identification. 1,...,10 are permissible values for a TOC identification. In the case of TOCSEC functions with identical values for the TOC identification the last TOCSEC assignment applies.
Member information for the first member satisfying the criteria specified in EM is written to the fields of EI.
If no member fulfills the defined criteria, EOF is entered in the RETURNCODE field of CB. The fields of EI remain unchanged.
A member corresponds to the criteria if it matches the mask specified in EM, i.e. each field of the member must match the corresponding field or, in the case of the range specification for the member size, fields of the mask.
Evaluating the string fields of the EM mask:
Each string field is interpreted up to the first blank. A string field starting with a blank is assumed to be empty. A blank at the beginning of the mask is equivalent to the entry ’*’; the member field always matches the mask field.
Evaluating the E-SIZE-MIN and E-SIZE-MAX fields:
All members match whose size (in PAM pages) complies with the following equation:E-SIZE-MIN ≤ size ≤ E-SIZE-MAX. If X‘00000000‘ is entered for E-SIZE-MIN and X‘FFFFFFFF‘ for E-SIZE-MAX, any value can be used for selection.
In addition to the mask fields of the TOCPRIM function, fields SEC-NAME and SEC-ATTRIBUTE of EM are used as search criteria. CSECT names which exceed 32 characters are truncated to this length before the wildcard comparison.
Two keywords may be entered in the VERSION field of EM:
*HIGH
Only the highest existing version is sought.
*LOW
Only the lowest existing version is sought.
These entries must start on the left in the VERSION field of EM and end with a blank. Any additional character entered in this field invalidates the keywords. If a version ending in HIGH is to be sought, only “**HIGH” needs to be specified.
Two output formats are available:
SHORT
The member information returned comprises only the member designation (TYP, NAME, VERSION), the secondary name (SEC-NAME), the secondary attribute (SEC-ATTRIBUTE) and the storage mode (STORE-FORM). The remaining fields contain blanks.
This output option is recommended when loops are programmed in the calling program and when only conditions for the member designation, the secondary name and the secondary attribute were specified with EM.LONG
The member information is output with extensions 1, 2 and 3. CSECT names which exceed 32 characters are truncated to this length for output in the SEC-NAME field. If such names are required in full, the secondary records of the member must be read with GET.
Call parameters
The parameter structures must be given in the following sequence in the subroutine call.
Parameter | Field | Meaning |
CB | SCBVERSION FUNCTION SUBCODE ACC LD-RETURN | Function control block Interface version Function code X’04’ Subcode (SHORT or LONG) Subroutine access identification Full DMS file name in LD |
TID | - | TOC identification Does not have to be supplied |
EI | - | Member information Does not have to be supplied |
LD | PASSWORD LINK MAX-NAME-LEN NAME | Library descriptor Password as per PASSWORD command Link name Maximum length of library name Library name |
EM | TYP NAME VERSION STORE-FORM USER-DATE USER-TIME CREATION-DATE CREATION-TIME MODIFI-DATE MODIFI-TIME SEC-NAME SEC-ATTRIBUTE P-TIND-READ P-READ-OWN P-READ-GRP P-READ-OTH P-READ-PIND P-TIND-WRIT P-WRIT-OWN P-WRIT-GRP P-WRIT-OTH P-WRIT-PIND P-TIND-EXEC P-EXEC-OWN P-EXEC-GRP P-EXEC-OTH P-EXEC-PIND P-GUARD-READ P-GUARD-WRIT P-GUARD-EXEC CCS-NAME P-TIND-HOLD P-HOLD-OWN P-HOLD-GRP P-HOLD-OTH P-HOLD-PIND P-GUARD-HOLD HOLD-STATE HOLDER ACCESS-DATE ACCESS-TIME E-SIZE-MIN E-SIZE-MAX | Member mask (search pattern) Member type Member name Member version Storage mode Date specified by user Time of day specified by user Date of member generation Time of member generation Date of last update Time of last update Reference name Reference attribute Protection type indicator for read Read indicator for owner Read indicator for group Read indicator for others Read password indicator Protection type indicator for write Write indicator for owner Write indicator for group Write indicator for others Write password indicator Protection type indicator for execute Exec indicator for owner Exec indicator for group Exec indicator for others Exec password indicator Read guard Write guard Exec guard Coded Character Set name Borrowing privilege indicator Borrowing privilege indicator for owner Borrowing privilege indicator for group Borrowing privilege indicator for others Borrowing password indicator Borrowing guard Hold flag: member state User ID of holder Date of last access to member Time of last access to member Lower limit of member size selection Upper limit of member size selection |
Return parameters
Parameter | Field | Meaning |
CB | RETURNCODE LMS-MSG DMS-MSG PLAM-MSG | Function control block Return code LMS message code DMS message code PLAM message code |
LD | NAME | Library descriptor Full DMS file name of library (dependent on LD-RETURN |
EI | TYP ... | Member information EI fields (see "EI (Element Information)") filled as appropriate to subcode in TOCPRIM or TOCSEC |