Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

LMS as a subroutine

The subroutine interface offers the user a convenient facility for processing program libraries and their members. The LMS functions discussed below are called directly from a user program (COBOL, C, Assembler). Control remains in the user program.

Opening and terminating subroutine access

Subroutine access is opened via the INIT function and terminated via END. Every time INIT is called, a new subroutine access identification is created so that parallel subroutine accesses can be identified.

Functions for the subroutine interface

The following functions can be called via the subroutine interface:

  • ADD incorporates files as members in a library.

  • CLOSLIB closes a library.

  • COPY permits members to be copied.

  • COPYLIB copies libraries logically.

  • COPYSTR copies delta members with their structure being retained.

  • DEL is used to delete members.

  • GSYSELEM reads the contents of a system variable, interprets it as a member specification (library, member name, version and type) and converts it to a form that the subroutine interface can handle.

  • LOCK prevents members from being modified.

  • LST selects members for output to SYSLST.

  • MODEA is used to set member attributes.

  • MODEP is used to set member protection.

  • MODLA is used to set library attributes.

  • MODTA is used to set type attributes.

  • PROVIDE allows a member to be “borrowed”.

  • REN serves to rename non-delta members.

  • REORGLIB reduces the amount of disk storage space required for a library.

  • RETURN returns a “borrowed” member.

  • SEL selects members for output to a file.

  • SHOWLA selects library attributes for output.

  • SHOWTA permits the type attributes to be displayed.

  • UNLOCK readmits modification of members.

Functions for reading or writing members

When a member is to be read or written, it must be opened using one of the three OPEN functions:

  • OPENGET opens members for reading

  • OPENPUT opens members for writing

  • OPENUPD opens members for reading and writing

Simultaneous OPENGET, OPENPUT and OPENUPD calls for the same member are not possible.

All OPEN functions define an access path identification which permits several members to be opened concurrently. This identification must always be specified in subsequent GET and PUT calls.

  • GET enables a record to be read

  • PUT enables a record to be written

  • CLOSE must be used to close the member explicitly after it has been processed

Functions for searching for members

Three TOC functions provide information on member entries:

  • TOCPRIM searches for a member in the primary directory

  • TOCSEC searches for a member in the secondary directory

  • TOC searches for further members

TOCPRIM and TOCSEC are used to define the search criteria for a member and to output the member entries of the first member satisfying these criteria. At the same time, a TOC identification must be specified for both functions. If the search criteria are to be used to look for further member entries, the TOC function must be called. The TOC function continues TOCPRIM or TOCSEC. The TOC identification must be specified in the TOC call in order to determine which of the two functions is to be continued.

Functions for member protection

Member protection can be set by means of the following functions:

  • MODEP sets member protection for a specific member.

  • MODTA sets the initial member protection for all new members of a specific member type.

  • MODLA sets the initial member protection for all new members of a library.

Member protection can be displayed by means of the following functions:

  • The TOC functions display the member protection for a specific member.

  • SHOWTA displays the type attributes of a specific member type.

  • SHOWLA displays the library attributes of a library.

Functions for version automation

The following two functions apply to version automation:

  • MODTA to set the convention.

  • SHOWTA to display the valid convention.

STD-SEQUENCE, MULTI-SEQUENCE and STD-TREE are available as conventions.

Functions for the support of extended character sets in LMS

The following functions support extended character sets in LMS (see the “XHCS” manual [2 (Related publications)]):

  • MODEA to set and modify a character set name

  • the TOC functions to display the character set name assigned to a member.

Functions for managing permissible storage modes

Versions of data can be stored either in full or in delta (incremental) form. The following functions are available for managing the permissible storage mode for a given library or type:

  • MODLA to set the permissible storage mode for the members of a library.

  • MODTA to set the permissible storage mode for the members of a type.

  • SHOWLA to check the permissible storage mode for the members of a library.

  • SHOWTA to check the permissible storage mode for the members of a type.

The storage mode for a member is selected when the member is created.

Functions for supporting a borrowing mechanism

  • MODLA to set the write control for a library and to define the initial borrowing privilege for all new members of that library.

  • MODTA to set the write control for a type and to define the initial borrowing privilege for all new members of that type.

  • MODEP to set the borrowing privilege for a member.

  • MODEA to set the state for a member (FREE or INHOLD).

  • PROVIDE to reserve a member of a source library and then copy it to an output library.

  • RETURN to return a member of a source library to an output library, provided that the base specified for the target version has been reserved by the user in the output library. RETURN also deletes the member from the source library and cancels the reservations in the output library.

  • SHOWLA to check the write control and initial borrowing privilege of a library.

  • SHOWTA to check the write control and initial borrowing privilege of a type.

  • The TOC functions to check the state (FREE or INHOLD) and borrowing privilege of a member.

Functions for supporting make functionality

  • MODEA for updating the modification date.