Using the Save (SAV) command
This information explains how to use the SAV command with the OBJ parameter.
The SAV command enables you to save the following data:
- A specific object
- A directory or subdirectory
- An entire file system
- Objects that meet search value
You can also save the items in this list by using the QsrSave API. For more information, refer to the API finder.
SAV OBJ(('/MyDir')) PATTERN(('*.bkp' *OMIT))
When you use the SAV command to save the current directory SAV OBJ('*') and the current directory is empty (it has no files or subdirectories), the system does not save anything. The command does not save the one *DIR object that represents the current directory. However, when you explicitly specify the directory by name SAV OBJ('/mydir') you include the *DIR object in your save operation. The same applies to the home directory.
Another feature that the SAV command offers is the Scan objects (SCAN) parameter for purposes such as virus protection. If exit programs are registered with any of the integrated file system scan-related exit points, you can specify whether objects will be scanned while being saved. This parameter also enables you to indicate whether objects that previously failed a scan should be saved.
When you use the SAV command, you can specify OUTPUT(*PRINT) to receive a report of what the system saved. You can also direct the output to a stream file or to a user space. The SAV command does not provide the option to create an output file. The Interpreting output from save (SAV) and restore (RST) topic describes output file format information from the SAV and RST commands.