Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Processing members

&pagelevel(4)&pagelevel

The following sections provide an overview of the possible ways in which members can be processed with LMSCONV. LMSCONV can

  • add elements to libraries

  • output elements to files

  • output elements to other libraries (copy)

  • list elements

  • delete elements

  • correct elements

  • output the directory of a library

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 - Add member to library") adds files, modules from the EAM area and records from the LMSCONV statement stream to the assigned library as members. If no library is specified, the library opened by OPEN-LIBRARY is used.

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 notes below).

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 of a PAM file is always retained when the file is added to a library as a member of the type X. If it is added as a member of the type C, its LBP is only retained if SOURCE-ATTRIBUTES= *KEEP(KEEP-TYPES=*ALL).

For SAM node files, the coded character set on Net-Storage (NETCCSN) can be preserved if they are added to the library using ADD-ELEMENT SOURCE-ATTRIBUTES=*KEEP.

The ISAM keys of a source program file should not be included in the member. 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 5: Adding members with ADD-ELEMENT

COPY-ELEMENT

The COPY-ELEMENT statement (see "COPY-ELEMENT - Copy member") copies members from the input library to the output library, storing them there with different member designations, if desired:

Figure 6: Adding members with COPY-ELEMENT

MODIFY-LOGGING-PARAMETERS

The statement MODIFY-LOGGING-PARAMETERS TEXT-OUTPUT=*LIBRARY-ELEMENT (see "MODIFY-LOGGING-PARAMETERS - Modify logging settings") writes the LMSCONV log in the member specified by *LIBRARY-ELEMENT:

Figure 7: Storing the LMSCONV log in a member

Outputting members to a file

The members of a library are output to a file by means of the EXTRACT-ELEMENT statement (see "EXTRACT-ELEMENT - Output member to file") :

Figure 8: Outputting members

File attributes that were stored when adding a member will be restored when outputting the member to a file. This includes also the last byte pointer (LBP) for PAM files and the coded character set on Net-Storage (NETCCSN) for SAM node files.

If the LBP is stored when adding a member, the member cannot be extracted to a tape or private disk.

LMS with a version smalller than V3.4C cannot extract C-members with stored file attributes and may create an empty PAM file and/or output an error message.

Listing members

The SHOW-ELEMENT statement (see "SHOW-ELEMENT - Display contents of member") displays the member content. It is possible to define the format in which the members are to be output and how much information is to be displayed.

Deleting members

The DELETE-ELEMENT statement (see "DELETE-ELEMENT - Logically delete member") deletes members in the assigned library. A distinction is made between logical and physical deletion:

  • Logical deletion
    The entries in the directory are deleted and storage space for the member concerned is released (this only affects space within the library, i.e. the size of the library itself is not reduced).

  • Physical deletion
    In addition to logical deletion, the storage space of the corresponding member is overwritten with binary zeros.
    A member of a library is deleted physically if the DESTROY=*YES parameter has been set or if the member contains a code for physical deletion or if the system parameter DESTLEV requires it.

Correcting members

LMSCONV provides the following correction statement:

MODIFY-ELEMENT (see "MODIFY-ELEMENT - Modify member") corrects object modules, link and load modules, phases and text members via substatements (Member types R, L, C and member types S, M, J, P, D, X.)

Correction of these members is controlled by various substatements. These are read from the statement stream immediately following MODIFY-ELEMENT up to the END-MODIFY substatement.

The corrected member is then written back to the assigned library. It may receive a new member designation.

For types R, L and C, you may use the following functions:

  • correct text records

  • cancel corrections

  • delete record types from the input member

For type R only, you may also use the following functions:

  • generate REP records

  • modify control section attributes

  • rename symbols

For text members, you may use the following functions:

  • insert records

  • delete records

Outputting library directories

The SHOW-ELEMENT-ATTRIBUTES statement (see "SHOW-ELEMENT-ATTRIBUTES - Display member attributes") logs the directory entries of the specified members or of the entire library.

The directory is always output sorted by member type. The remainder of the sort sequence is determined by the SORT operand. Unless otherwise specified, member designations are output sorted by type, name and version.

To obtain the complete directory of a library, all you have to do is enter the SHOW-ELEMENT-ATTRIBUTES statement without further operands, provided no individual member type was specified using the MODIFY-DEFAULTS statement.

Storing procedures

LMSCONV allows the user to store procedures and ENTER jobs as members in libraries (member type J).

Existing procedure files can be added to libraries as members by means of ADD-ELEMENT.

Storing procedures in this way, especially where small command files are concerned, saves storage space. The number of catalog entries is decreased.

Note, however, that any ISAM keys that have been stored (see "Processing members") must be removed from the members before the procedure is called.

A library member can also be assigned as the system input file (SYSDTA) by means of /ASSIGN-SYSDTA (see the “Commands” manual [1 (Related publications)]).