IBM Support

How to copy a SAVF to/from a library?

Question & Answer


You may have a save file (SAVF) that is sitting on the IFS and you need to get it into a library. Or you may need to get a SAVF that is currently in a library and place it on the IFS


SAVF is located on the IFS and would like to move that into a Lib/SAVF:

Example command:

CPY OBJ('/rhdieser/savf.file') Name of my SAVF on the IFS. The file extension could be ".file",".savf", or even blank.
TOOBJ('/qsys.lib/rhdieser.lib/savf.file') "rhdieser.lib" is the library and "savf.file" is the destination file (file will be created)
TOCCSID(37) If the SAVF was FTP'd - the CCSID is usually wrong.

What you see on the IFS:
==> This file was FTP'd to the system. The CCSID ended up being 819

SAVF is located in a library and you need to copy that to the IFS:

CPY OBJ('/qsys.lib/rhdieser.lib/savf.file') When referencing a SAVF in a library - always use the ".file" extension
TODIR('/rhdieser') IFS path where the SAVF will be sent to

Notice the difference on the IFS.
==> The CCSID of the resulting file ends up being 37 (you can see this via option 8)
==> The file has the attribute of "SAVF"

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"","label":"iSeries"},{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"All Editions","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
18 December 2019