Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Adding members to a library

The following statements add members to the assigned library:

ADD-ELEMENT, COPY-ELEMENT and MODIFY-LOGGING-PARAMETERS.

The WRITE-MODE operand determines whether or not an identically named member in the output library is overwritten.

ADD-ELEMENT

The ADD-ELEMENT statement (see "ADD-ELEMENT") adds files, modules from the EAM area and records from the LMS statement stream to the assigned library as members. If no library is specified, the library opened by OPEN-LIBRARY is used.

This statement enables the user to additionally define whether the member is stored as a non-delta member or as a delta member.

The FIXED and UNDEFINED record formats are converted into the VARIABLE record format; i.e. given a 4-byte record header. Libraries permit files with a RECORD-SIZE of up to 32 Kbytes (including the record header) to be stored.

If an ISAM file is added, the SOURCE-ATTRIBUTES operand determines whether the file attributes, the ISAM key and information on ISAM secondary keys are included.

ISAM keys having a length of up to 255 bytes may then be stored.

Members having ISAM keys are suitable only for archiving (see Note).

If the operand SOURCE-ATTRIBUTES=*KEEP is set, it is also possible to include files with RECORD-FORMAT=*FIXED; if not, only RECORD-FORMAT=*VARIABLE is allowed.

The Last Byte Pointer (LBP) can be preserved for PAM files that are added to a library as X or as C members. PAM X members always preserve the LBP whereas C members preserve the LBP only if they were added to the library using SOURCE ATTRIBUTES=*KEEP(KEEP TYPES=*ALL) in the //ADD ELEMENT statement. For more details, see the following table:


Type X, access type PAM

Type C

SOURCE ATTR = *STD

LBP is stored

LBP is not stored

SOURCE ATTR = *IGNORE

LBP is stored

LBP is not stored

SOURCE ATTR = *KEEP
(KEEP TYPES = *STD)

LBP is stored

LBP is not stored

SOURCE ATTR = *KEEP
(KEEP TYPES = *ALL)

LBP is stored

LBP is stored

The net coded character set name (NETCCSN) can be preserved for SAM node files if they are stored in the library with file attributes using the operand SOURCE ATTRIBUTES=*KEEP

Notes

  • The ISAM keys of a source program file should not be included in the member, since the compiler cannot translate the source program from this member without errors if ISAM keys are present.

  • If system file SYSDTA is assigned to a member which has stored the ISAM key, the ISAM keys are also read. The ISAM keys must then be removed from the program which carries out the processing.

Files can be stored under the following member types:

Figure 4: Adding members with ADD-ELEMENT

COPY-ELEMENT

The COPY-ELEMENT statement (see "COPY-ELEMENT") copies members from the input library to the output library, storing them there with different member designations, if desired. This statement enables the user to additionally define whether the member is stored as a nondelta member or as a delta member.

Figure 5: Adding members with COPY-ELEMENT

MODIFY-LOGGING-PARAMETERS TEXT-OUTPUT=*LIBRARY-ELEMENT

The statement MODIFY-LOGGING-PARAMETERS TEXT-OUTPUT=*LIBRARY-
ELEMENT (see "MODIFY-LOGGING-PARAMETERS") includes the LMS log (see "Controlling log output") in the member specified by *LIBRARY-ELEMENT.

Figure 6: Storing the LMS log in a member