IBM Support

SAV OUTPUT(Stream-File-Path-Name) Command Example and Considerations

Troubleshooting


Problem

When using the SAV command and parameter OUTPUT(stream-file-path-name), the output is not discernible.

Resolving The Problem

When using the SAV command and specifying a stream-file-path-name for the OUTPUT parameter, the output is not discernible.

The following is an example of how one might use the SAV command to create a list of information about the saved objects to a stream file output file.

First, you should create an empty stream file in a directory where the output will be stored. In this example, stream file SAVOUTPUT.txt is created in the /myoutputdir directory. The following SAV command is used to save directory /mydir/subdirectory to a save file (yourlib/yoursavf) and put the output list to stream file /myoutputdir/savoutput.txt.

SAV DEV('/qsys.lib/yourlib.lib/yoursavf.file') OBJ(('/mydir/subdirectory')) OUTPUT('/myoutputdir/savoutput.txt') INFTYPE(*ALL)

After the output is sent to a stream-file-name, it may look unfamiliar as the format of the file is BINARY (not EBCIDIC or ASCII). To view the file, users must write an application to read through the output. The ICONV API can be used to convert the Unicode path name to a readable format.

Note: If the OUTPUT file specified is not a stream file, message CPF3828 -Error occurred while attempting to use &1 is received. For instance, the following command would generate a CPF3828 as the OUTPUT file specified is an object of type File in library MYLIB.

SAV DEV('/qsys.lib/mylib.lib/mysavf.file') OBJ(('/mydir/subdir')) OUTPUT('/qsys.lib/mylib.lib/savlog14.file')

Note: SAV OUTPUT(*PRINT) can be used to create a list of information about the saved objects to a spooled file. The output is printed with the job's spooled output and can be viewed without any conversion.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"},{"code":"a8m0z000000cwp6AAA","label":"Save Restore"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

29901739

Document Information

More support for:
IBM i

Component:
IBM i, Save Restore

Software version:
All Versions

Operating system(s):
IBM i

Document number:
639889

Modified date:
29 March 2025

UID

nas8N1016595

Manage My Notification Subscriptions