Command reference / save
SAVOBJ
Save Object
Saves a copy of a single object or a group of objects located in the same library. With OBJ(*ALL), objects can be saved from a list of libraries. Saving to a save file allows only one library. Each object is written to tape, optical media, or a save file. Objects are not changed unless storage is to be freed, but each object's description is updated with its save date, time and place unless UPDHST(*NO). For job queues, user queues, message queues and logical files only descriptions are saved; access paths can be included with ACCPTH, spooled file contents with SPLFDTA, save file contents with SAVFDTA, and data queue contents with QDTA. File overrides are ignored except for the output file.
The source help entry is marked incomplete.
Allowed environments: *ALL.
Positional parameters: 5.
Restrictions
- Requires either *SAVSYS special authority, or *OBJEXIST authority to each object saved (for spooled file data, *OBJEXIST on the output queue) and *EXECUTE authority to each library the objects are saved from.
- Without *SAVSYS, only the objects you have authority for are saved.
- Saving to tape or optical requires *USE authority to the device description and device file. Saving to a save file requires *OBJOPR and *ADD authority to the save file and *EXECUTE authority to its library.
- Using a media definition requires *USE authority to it and *EXECUTE authority to its library.
- The data dictionary for a library or its database files is not saved by this command; use SAVLIB for that.
- If tape is used, a standard-labeled volume must be in the device.
- No object being saved can be changed by a running job during the save unless save-while-active is used.
- When a save file's contents are saved into the same save file with SAVFDTA(*YES), only the save file description is saved.
- When a save file's contents are saved with SAVFDTA(*YES), the save file must be restored before the objects in it can be restored.
Parameters
OBJ
Objects
Names or generic names of the objects to save. All must be in the library named in LIB. If OBJTYPE is *ALL or includes *FILE, file members may also be selected. Required.
Suggested / special values:
*ALL
*ALL- All objects in the specified libraries are saved, depending on OBJTYPE.
LIB
Library
Libraries containing the objects to save. Required; up to 300 values. A generic library name cannot be used when saving to a save file.
Suggested / special values:
*SELECT, *USRSPC
*SELECT- The libraries identified in the SELECT parameter are saved; only one library when saving to a save file.
*USRSPC- The libraries listed in the user space named by CMDUSRSPC are saved.
DEV
Device
Device used for the save. The device name must already exist as a device description. Required.
Suggested / special values:
*SAVF, *MEDDFN
*SAVF- The save file named in SAVF is used.
*MEDDFN- The devices and media in the media definition named in MEDDFN are used.
OBJTYPE
Object types
Types of system objects to save, such as *CMD or *FILE. Up to 300 values.
Suggested / special values:
*ALL
*ALL- All object types that are specified by name and are in the library are saved.
VOL
Volume identifier
Suggested / special values:
*MOUNTED
SEQNBR
Sequence number
Suggested / special values:
*END
LABEL
Label
Suggested / special values:
*LIB
EXPDATE
File expiration date
Suggested / special values:
*PERM
ENDOPT
End of media option
Allowed values:
*REWIND, *LEAVE, *UNLOAD
SAVF
Save file
Save file that contains the saved data; must be empty unless CLEAR(*ALL). Required if DEV(*SAVF).
*LIBL- Qualifier 2: all libraries in the library list are searched.
*CURLIB- Qualifier 2: the current library is used; QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Save file
Save file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MEDDFN
Media definition
Qualified parts (object, then library; write LIBRARY/OBJECT)
Media definition
Media definition
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OPTFILE
Optical file
Suggested / special values:
*
USEOPTBLK
Use optimum block
Allowed values:
*YES, *NO
TGTRLS
Target release
Allowed values:
*CURRENT, *PRV, V7R3M0, V7R4M0, V7R5M0
UPDHST
Update history
Whether each saved object's save history (date, time and location) is updated.
Allowed values:
*YES, *NO
*YES- The last save date, time and location are updated in each saved object.
*NO- The save history in each saved object's description is not updated.
CLEAR
Clear
Allowed values:
*NONE, *ALL, *AFTER, *REPLACE
PRECHK
Object pre-check
Allowed values:
*NO, *YES
SAVACT
Save active
Allowed values:
*NO, *LIB, *SYNCLIB, *SYSDFN
SAVACTWAIT
Save active wait time
Elements in order
Object locks
Object locks
Suggested / special values:
*NOMAX
Pending record changes
Pending record changes
Suggested / special values:
*LOCKWAIT, *NOCMTBDY, *NOMAX
Other pending changes
Other pending changes
Suggested / special values:
*LOCKWAIT, *NOMAX
SAVACTMSGQ
Save active message queue
Qualified parts (object, then library; write LIBRARY/OBJECT)
Save active message queue
Save active message queue
Suggested / special values:
*NONE, *WRKSTN
Library
Library
Suggested / special values:
*LIBL, *CURLIB
SYNCID
Synchronization ID
Suggested / special values:
*NONE
FILEMBR
File member
Elements in order
File
File
Suggested / special values:
*ALL
Member
Member
Suggested / special values:
*ALL, *NONE
ACCPTH
Save access paths
Whether logical file access paths dependent on the physical files being saved are also saved. Logical file objects themselves are not saved.
Allowed values:
*SYSVAL, *NO, *YES
*SYSVAL- The QSAVACCPTH system value determines whether access paths are saved.
*NO- Only the specified objects are saved; no access paths.
*YES- The specified physical files and all eligible access paths over them are saved.
SAVFDTA
Save file data
For save file objects, whether the description, or both the description and contents, are saved.
Allowed values:
*YES, *NO
*YES- The description and contents of a save file are saved.
*NO- Only the description of the save file is saved.
SPLFDTA
Spooled file data
Whether spooled file data and attributes are saved for the output queues that are saved.
Allowed values:
*NONE, *ALL
*NONE- No spooled file data is saved.
*ALL- All available spooled file data on each saved output queue is saved.
QDTA
Queue data
For queue objects, whether the description, or both the description and contents, are saved.
Allowed values:
*NONE, *DTAQ
*NONE- Only the queue description is saved.
*DTAQ- The description and contents of a standard data queue are saved.
PVTAUT
Private authorities
Allowed values:
*NO, *YES
STG
Storage
Allowed values:
*KEEP, *FREE
DTACPR
Data compression
Allowed values:
*DEV, *NO, *YES, *LOW, *MEDIUM, *HIGH, *ZLIB
COMPACT
Data compaction
Allowed values:
*DEV, *NO
OMITLIB
Libraries to omit
Suggested / special values:
*NONE, *USRSPC
OMITOBJ
Objects to omit
Elements in order
Object
Object
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Suggested / special values:
*NONE, *ALL
Library
Library
Suggested / special values:
*ALL
Object type
Object type
Suggested / special values:
*ALL
SELECT
Select
Elements in order
Include or omit
Include or omit
Allowed values:
*INCLUDE, *OMIT
Object
Object
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Suggested / special values:
*ALL
Library
Library
Suggested / special values:
*ALL
Object type
Object type
Suggested / special values:
*ALL
Object attribute
Object attribute
Suggested / special values:
*ALL, *BLANK
File member
File member
Suggested / special values:
*ALL, *ALLMBR
ASPDEV
ASP device
Suggested / special values:
*, *SYSBAS, *CURASPGRP
OUTPUT
Output
Allowed values:
*NONE, *PRINT, *OUTFILE
OUTFILE
File to receive output
Qualified parts (object, then library; write LIBRARY/OBJECT)
File to receive output
File to receive output
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OUTMBR
Output member options
Elements in order
Member to receive output
Member to receive output
Suggested / special values:
*FIRST
Replace or add records
Replace or add records
Allowed values:
*REPLACE, *ADD
INFTYPE
Type of output information
Allowed values:
*OBJ, *LIB, *MBR, *ERR
CMDUSRSPC
Command user space
Qualified parts (object, then library; write LIBRARY/OBJECT)
Command user space
Command user space
Library
Library
Suggested / special values:
*LIBL, *CURLIB
Generated from os/cl/catalog/SAVOBJ.json and os/cl/help/SAVOBJ.json.