RSTS36LIBM (Restore System/36 Library Members)

RSTS36LIBM Command syntax diagram

 

Purpose

The Restore System/36 Library Members (RSTS36LIBM) command reads a file containing library members, creates database source or data file members on the iSeries 400, and copies the member data from the file into each restored member. The input file can be a diskette file, tape file, or database physical file on the iSeries 400. The file could have been created on a System/36, a System/34, or a System/32 using either the FROMLIBR or SAVELIBR system OCL procedure (or the equivalent call of $MAINT), or on an iSeries 400 using the SAVS36LIBM CL command.

Diskette files created on a System/34 using the BACKUP procedure or $BACK utility are not accepted by this command. Compressed SAVELIBR diskette files (used by IBM to distribute system libraries for System/36 after release 5.0) are not accepted by this command.

In System/36 terms, the input file format could be a SAVELIBR diskette file or tape file, a record-mode LIBRFILE diskette file, tape file, or physical file, or a sector-mode LIBRFILE diskette file, tape file, or physical file. In other words, the input file can be any diskette file, tape file, or physical file created by the System/36 $MAINT SSP utility.

If the library identified by the TOLIB parameter value does not exist, it is created. Also, the source files QS36SRC and QS36PRC are created if they do not exist in the restore-to library.

If the restore operation creates the library, the new library is owned by the user running the RSTS36LIBM command and the library is created with a default authority of *ALL (that is, the same as AUT(*ALL)).

If a sector-mode FROMLIBR file or a SAVELIBR file created on a System/36 is being restored, data files QS36LOD and QS36SBR may also be created to hold restored load and subroutine members. Restored load and subroutine members are not converted on the current system.

 

Restrictions

If the name contains a blank, a single quotation mark (') a double quotation mark ("), an asterisk (*), a question mark (?), or a device control character (hexadecimal '00'-'3F' or hexadecimal 'FF'), these characters are replaced by underlines and the member is restored using the resulting simple or extended name (for example, A*/? would become A_/_ and A? would become A_).

An informational message is sent each time invalid characters are replaced to get a valid name. An additional informational message is sent if the resulting name change caused a member to be replaced. No message is sent if a member is restored using the extended name syntax without replacing invalid characters.

 

Required Parameters

TOMBR
Specifies the names of the members to restore.

*ALL: All members of the specified member types are restored.

member-name: The members that have the specified member name are restored.

generic*-member-name: All members that have the specified generic member name are restored. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.

TOLIB
Specifies the library that will contain the members to restore from the input file.

DEV
Specifies the names of the devices to use for the restore operation. Each device name must already be known on the system by a device description.

*PHYFILE: The input file is the database physical file specified by the PHYFILE parameter.

device-name: Specify the name of the diskette device, the media library device, or the names of tape devices that are used for the operation. If more than one tape device is used, specify the names of the devices in the order in which they are used. When more than one tape volume is used, using more than one tape device permits one tape volume to be rewound or unloaded while another tape device processes the next tape volume. More information on device names is in the APPC, APPN, and HPR topic in the Information Center.

 

Optional Parameters

SRCMBRS
Specifies which source member types (source and procedure members on System/36) are restored.

*ALL: All source and procedure members in the input file that match the member name specified (TOMBR parameter) are restored. For example, if TOMBR(PAY*) and SRCMBRS(*ALL) is specified, all source and procedure members that start with the letters 'PAY' are restored.

*SRC: Only System/36 source members (to file QS36SRC) that match the member name specified (TOMBR parameter) are restored.

*PRC: Only System/36 OCL procedure members (to file QS36PRC) that match the member name specified (TOMBR parameter) are restored.

*NONE: No source or procedure library members are restored.

OBJMBRS
Specifies which object member types (load and subroutine members on System/36) are restored. Because the System/36 and the iSeries 400 are not object compatible, any restored members are not immediately useable after the restore operation. IBM-supplied commands or user-written operations must be run to convert the object member to a useable iSeries 400 object.

*NONE: No System/36 object members are restored.

*SBR: Only System/36 subroutine members (to file QS36SBR), which match the member name specified (TOMBR parameter), are restored.

*LOD: Only System/36 load members (to file QS36LOD), which match the member name specified (TOMBR parameter), are restored.

*ALL: All load and subroutine members in the input file which match the member name specified (TOMBR parameter), are restored. For example, if TOMBR(CONF1) and OBJMBRS(*ALL) are specified, load and subroutine members with the member name 'CONF1' are restored.

MBROPT
Specifies, for database files currently on the system, which file members are restored.

*NEW: Only new members (members that do not already exist in the appropriate source or data file) are restored.

*OLD: Only old members (members that already exist in the appropriate file) are restored. The existing member is replaced by the copy of the member restored from the file.

*ALL: All members are restored, even if they already exist in an iSeries 400 source or data file. Members that do not already exist are created, and members that do exist are replaced.

IGCDTA
Specifies whether the source and procedure members being restored can contain double-byte character set (DBCS) data.

Note: This attribute is used if the restore operation needs to create source files QS36SRC and QS36PRC to hold the restored library members. If the QS36SRC or QS36PRC source file already exists in the library specified on the TOLIB parameter and the file's DBCS capability does not match the parameter, an error message is sent and no member is restored.

*NO: The file does not process DBCS data.

*YES: The file processes DBCS data.

FROMLABEL
Specifies the label (8 characters maximum) of the diskette file or tape file that contains the members to copy to the iSeries 400 (it identifies the input file for the restore operation). If the DEV parameter value is not *PHYFILE, a FROMLABEL value must be specified.

CRTDATE
Specifies the creation date of the object.

The date must be entered in the job date format (DATFMT); if separators are used, specified by the job date separator character (DATSEP), the value must be enclosed in apostrophes.

For diskettes coming from a System/36, there may be several files on one diskette with the same name and different creation dates. Specifying a value for the CRTDATE parameter is the only way of choosing which diskette file to use.

For tapes from System/36 or the iSeries 400, there can be several files on a tape with the same name. The user can use the CRTDATE or SEQNBR parameter to choose the correct file. If a numeric SEQNBR parameter and the CRTDATE parameter are specified, the SEQNBR parameter takes precedence. If the file at the specified sequence number has a different creation date, the restore operation ends.

Specify the creation date of the tape file or diskette file to use for the restore operation. The date specified is changed to Julian format (cyyddd) for tape files and international format (yymmdd) for diskette files.

If no value is specified, the diskette file or tape file creation date is not used to select the input file. For diskette files, take the first file in the diskette VTOC with the name specified on the FROMLABEL parameter. For tape files, take the first file on the tape with the name specified on the FROMLABEL parameter. If the previous tape operation had specified ENDOPT(*LEAVE), the search for a matching file does not start at the beginning of the tape reel.

SEQNBR
Specifies, only when tape is used, which sequence number is used for the restore operation.

*SEARCH: The volume that is placed in the device is searched for a data file with an identifier that matches the FROMLABEL parameter value; when a match is found, the data file is restored. If the last operation on the tape device specified ENDOPT(*LEAVE), the file search begins with the data file at the current tape position. Otherwise, the search begins with the first data file on the tape volume. The header label name from the file found by the SEQNBR parameter is compared to the name specified for the FROMLABEL parameter. If the names are the same, the restore operation can continue. If the names are different, the restore operation ends.

file-sequence-number: Specify the sequence number of the file that is used. Valid values range from 1 through 9999.

VOL
Specifies the volume identifiers of the tape volumes or diskette volumes from which the objects are being restored. The volumes must be in the same order as they were when the library was saved. If the library was known to the system before the restore operation, the system can verify whether the volumes put on tape contain the current version of the library. The volume that contains the beginning of the file to be restored should be placed in the tape or diskette unit. More information on this parameter is in commonly used parameters.

*MOUNTED: The objects are restored from the volumes placed in the device specified on the DEV parameter.

volume-identifier: Specify the volume identifiers of the tapes or diskettes to be used for restoring the file. For each tape or diskette volume name, up to 6 characters can be specified using any combination of letters and digits. Up to 50 volume identifiers can be specified.

ENDOPT
Specifies the operation that is automatically performed on the tape volume after the operation ends. If more than one volume is included, this parameter applies only to the last tape volume used; all other tape volumes are rewound and unloaded when the end of the tape is reached.

Note: This parameter is ignored if a diskette device is specified in the DEV parameter.

*REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.

*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.

*UNLOAD: The tape is automatically rewound and unloaded after the operation ends.

PHYFILE
Specifies the qualified name of the database physical file that is used as the input file for the restore operation.

The file must have a record length of between 40 and 120 bytes if it contains members saved in record mode. The record length must be 256 if it contains members saved on a System/36 in sector mode.

If the specified file does not exist or is not a physical file, no library members are restored. If the physical file contains several members, the first member of the file is used.

The name of the physical file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

file-name: Specify the name of the database physical file that is used as the input file for the restore operation.

Examples for RSTS36LIBM

Example 1: Restoring All Members

RSTS36LIBM  TOMBR(XYZ1)  TOLIB(JOHNSON)  DEV(I1)
  SRCMBRS(*PRC)  MBROPT(*ALL)  FROMLABEL('XYZ1')

The single OCL procedure member XYZ1 is restored as a member of source file QS36PRC in library JOHNSON. Assuming I1 refers to a diskette device, the input diskette file must have the label XYZ1.

Example 2: Specifying a Generic Member Name

RSTS36LIBM  TOMBR(X*)  TOLIB(ORDER)  DEV(*PHYFILE)
  PHYFILE(NETLIB/S36SRC)

All source and procedure members with names starting with the character 'X' and that do not already exist as members of QS36SRC and QS36PRC in library ORDER are restored. The members are restored from file S36SRC in library NETLIB.

Error messages for RSTS36LIBM

*ESCAPE Messages

CPF2C4A
Device &1 not correct for command.
CPF2C4B
Duplicate device &1 specified in device name list.
CPF2C4C
Diskette device &1 included in multiple device specification.
CPF2C41
&2 members restored, &3 members not restored, &4 members excluded.
CPF2C42
No members restored to library &1, &4 members excluded.
CPF2C46
Input file &1 cannot be processed by RSTS36LIBM.
CPF2C48
Input file &1 in &2 not correct for command.
CPF2C49
Output file &1 in &2 not correct for command.
CPF2C5E
Input file &1 in &2 not correct for command.
CPF2C50
File description for file &1 is not available.
CPF2C52
Error occurred during attempt to create file &1 in library &2.
CPF2C53
Member &3 not added to file &1 in library &2 because error occurred.
CPF2C57
DBCS attribute not same as existing file &1 in &2.
CPF2C70
Input file &1 contains incorrect control statement record.
CPF2C71
NAME keyword on COPY statement missing or incorrect.
CPF2C72
LIBRARY keyword on COPY statement missing or incorrect.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9812
File &1 in library &2 not found.
CPF9814
Device &1 not found.
CPF9820
Not authorized to use library &1.
CPF9822
Not authorized to file &1 in library &2.
CPF9824
Not authorized to command &1 in library &2.
CPF9825
Not authorized to device &1.
CPF9826
Cannot allocate file &2.
CPF9830
Cannot assign library &1.
CPF9845
Error occurred while opening file &1.
CPF9847
Error occurred while closing file &1 in library &2.
CPF9849
Error while processing file &1 in library &2 member &3.

*STATUS Messages

CPI2C12
Copying file &1 in library &2 label &3 to work file.