SO (Sequential Data to Object)

Purpose
Restore one or more OAM objects that were backed up in a sequential data set, or create a new object from a sequential data set.
Usage notes
Use this function to copy data from a QSAM data set to an object database. If the input is a backup data set created with the OS (Object to Sequential Data) function, the object header records are used for restoring.

If loading from an object backup data set the objects are restored with the original name into the original collection. To filter loading specify a collection name, a generic object name, the location (DASD or OPTICAL, or a specific optical volume), and a creation date range. The filter applies to the object header information saved with the objects.

If the input does not contain backup copies of multiple objects, one object is created. You can specify a collection name and an object name. If the input data begins with an object header record, the default values are taken from it. The object is made up of the concatenated input records, excluding any object header.

Options
You can specify SMS storage class and management class values to be used for storing the object; these might, however, be overridden by your installation defaults. You can also specify whether an existing object with a matching name is to be replaced in the output collection.

For more information about using this function, see Restoring OAM objects.

Related functions
OO
Copy an object to the same or another collection
OS
Backup objects from an OAM database to a data set
VO
Copy VSAM data to an object database
Read syntax diagramSkip visual syntax diagram
Syntax

>>-SO----------------------------------------------------------->

   .-INPUT=QSAMIN--------------------------------------------------.   
>--+---------------------------------------------------------------+-->
   +-INPUT=ddname--------------------------------------------------+   
   '-DSNIN=dsname-+----------+-+-----------------+-+-------------+-'   
                  '-(member)-' '-VOLSERIN=volser-' '-UNITIN=unit-'     

   .-COLLECTN=**---------.  .-OBJNAME=**------.   
>--+---------------------+--+-----------------+----------------->
   '-COLLECTN=collection-'  '-OBJNAME=objmask-'   

>--+-------------------+--+-------------------+----------------->
   '-STORCLAS=storclas-'  '-MGMTCLAS=mgmtclas-'   

>--+-------------+--+---------------+--+-------------------+---->
   '-LIMIT=limit-'  '-VOLSER=volser-'  '-FROMDATE=fromdate-'   

                      .-REPLACE=NO------.   
>--+---------------+--+-----------------+----------------------><
   '-TODATE=todate-'  '-REPLACE=replace-'   

collection
If the data set contains one object with a header, you can optionally specify a collection name to override the collection name in the header.

If the data set contains one object with no header (or, equivalently, it contains data that was not previously an object), you must specify the collection where the object is stored.

If the data set contains one or more objects that were stored during a multiple-object backup, you can optionally specify a collection name to restore only objects from the specified collection.

In any mode except batch mode, the user's TSO prefix (normally the user ID) is used as the high-level qualifier for any name that is not entered in quotation marks.

ddname
Refers to a DD or TSO ALLOC statement. The default is QSAMIN.
dsname
Name of a sequential data set. If any DD statements are specified, they are not used. To further describe the data set, use the appropriate keywords as shown in the syntax diagram.
fromdate
The earliest creation date, in the form yyyymmdd. By default, all objects are copied regardless of their creation date.
limit
To limit the objects that are copied based on where the objects were located (before they were backed up to a data set), specify one of the following:
DASD
Only objects that were stored on DASD
OPTICAL
Only objects that were stored on optical disks
VOLUME
Only objects that were stored on a specified optical disk. You must also specify the volser of the optical disk.
member
For a PDS, the member name.
mgmtclas
Name of an SMS management class.
objmask
If the data set contains one object with a header, you can optionally specify an object name to override the object name in the header.

If the data set contains one object with no header (or, equivalently, it contains data that was not previously an object), you must specify a name for the object.

If the data set contains one or more objects that were stored during a multiple-object backup, you can optionally specify an object name or generic object name to limit the objects that are restored based on object name. Within the name, you can include a percent sign (%) to represent exactly one character, an asterisk (*) to represent any number of characters (or no characters) within a qualifier, or two asterisks (**) to represent any number of characters (or no characters) with any number of qualifiers.

In any mode except batch mode, the user's TSO prefix (normally the user ID) is used as the high-level qualifier for any name that is not entered in quotation marks.

replace
Specify YES to replace any existing objects with the same name in the collection. By default, the object is not copied.
storclas
Name of an SMS storage class.
todate
The latest creation date, in the form yyyymmdd.
unit
A 3 hexadecimal digit device number, a 4 hexadecimal digit device number prefixed by a slash (/), a device type, or an installation-defined group name.
volser
On input: the volume serial number for a non-cataloged data set.

On output: if you specified VOLUME for limit, the volume serial number of the optical disk.

//SO  JOB (acct),'name' Restore Objects
//ZDTOOLS  EXEC PGM=HFMMAIN
//SYSPRINT DD SYSOUT=*
//OBJBKUP  DD DSN='HFM.OBJECT.BKUP',
//            VOL=SER=FMO010,UNIT=CARTR,
//            DISP=OLD
//SYSIN    DD *
$$FILEM SO INPUT=OBJBKUP,OBJNAME=**,
$$FILEM    COLLECTN=SYSU.OAM.CLLCT000,
$$FILEM    LIMIT=VOLUME,VOLSER=OVOL03
$$FILEM EOJ
/*