Using the Save (SAV) command

The SAVcommand allows you to save the following data:

You can also save the items in this list by using the QsrSave API. For more information, refer to the System API Reference.

The Objects (OBJ) parameter on the SAV command supports the use of wildcard characters and the directory hierarchy. When you have a specific subset of similar objects within a directory subtree that you want to save, you can use the Name pattern (PATTERN) parameter to further define the objects that are identified in the (OBJ) parameter. For example, you could have a directory '/MyDir' that contains 100 subdirectories, Dir1 through Dir100, that each contain 100 .jpg files, Photo1.jpg through Photo100.jpg, with corresponding backup files, Photo1.bkp through Photo100.bkp. To save all of the .jpg files in '/MyDir', but omit the backup files, you could issue the following command:
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 server 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. 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 allows 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 server 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. Interpret output from save (SAV) and restore (RST) describes output file format information from the SAV and RST commands.

Related concepts
Interpret output from save (SAV) and restore (RST)
Save changed objects in directories
Related information
Integrated File System Scan on Close API (Exit Program)
Integrated File System Scan on Open API (Exit Program)
Integrated file system