OV (Object to VSAM)

Purpose
Copy one or more OAM objects from a collection or a primary or backup optical volume to a VSAM data set.
Usage notes
To copy only the data within an object, specify the collection and the object name, and that you do not want a header record.

To create a backup of a single object, specify the collection and the object name, and that you want the header record. The output data set must be a VSAM ESDS. File Manager saves the object together with its directory information. Use the VO (VSAM to Object) function to restore the object.

To create a backup of multiple objects from a collection, a primary or backup optical volume, specify a generic object name. Specify the collection name, the volser of an optical volume, or both. The output data set must be a VSAM ESDS. File Manager saves the directory information of all objects copied. Use the VO (VSAM to Object) function to restore all or selected objects.

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

Options
Limit processing to objects residing in DASD storage, on optical storage media, or on a specific optical volume. You can also specify a range for the creation date.

Specify the block size to be used for the output records. The default block size is 4096 bytes, the maximum is limited by the maximum record size defined for the VSAM cluster.

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
Figure 1. Syntax

1 OV
1! COLLECTN=**
1 COLLECTN=collection
1! OBJNAME=**
1 OBJNAME=objmask
3? LIMIT=limit
3? VOLSER=volser
3? FROMDATE=fromdate
3? TODATE=todate
1! OUTPUT=VSAMOUT
1 OUTPUT=ddname
1 DSNOUT=dsname
1! REUSE=NO
1 REUSE=reuse
1! HEADER=YES
1 HEADER=header
1! BLKSIZE=4096
1 BLKSIZE=blksize
blksize
Block size for the output data set. The maximum depends on the cluster definition; the default is 4 096.
collection
A collection name. 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.

The default is all collections; in this case, you must specify LIMIT=VOLUME and a volser.

ddname
Refers to a DD or TSO ALLOC statement. The default is VSAMOUT.
dsname
Name of a VSAM data set.
fromdate
The earliest creation date, in the form yyyymmdd. By default, all objects are copied regardless of their creation date.
header
If you are copying only one object, specify NO if you do not want a header record. The default is to put a header record at the beginning of the output data set.
limit
To limit the objects that are copied based on where objects are located, specify one of the following:
DASD
Only objects that are stored on DASD
OPTICAL
Only objects that are stored on optical disks
VOLUME
Only objects that are stored on a specified optical disk. You must also specify the volser of the optical disk.
objmask
An object name or generic 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) within 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.

The default is **. In batch mode, this means all objects; in any other mode, this means all objects that have the user's TSO prefix as high-level qualifier.

reuse
Specify YES to replace any existing records in the output data set (if it is defined with the REUSE parameter in the catalog). Specify NO to add new records without deleting the old records. The default is NO.
todate
The latest creation date, in the form yyyymmdd.
volser
If you specified VOLUME for limit, the volume serial number of the optical disk.
 /* REXX */
 /* This EXEC saves all OAM objects in a VSAM */
 /* data set which were added to a collection */
 /* at the current day:                       */

 /* Get date in format YYYYMMDD               */
 fromdate = DATE('STANDARD')
 say 'Saving objects from' fromdate

 /* create backup copy of all new objects     */
 "FILEMGR $OV  COLLECTN='SYSU.OAM.CLLCT000',",
              "FROMDATE="||fromdate,
              "DSNOUT=REUSABLE.ESDS,REUSE=YES"

  return