The SAV command is used to save IFS objects, as well as QSYS.LIB and DLO objects. In other words, it can be used to save any object on the system regardless of which file system it is in. The key to using it is being able to specify the correct device when saving to a device or a save file.
You first have to understand where your devices and your save files are located on the system. All devices on IBM i have a device description that is located in a library called QSYS. All other libraries on IBM i are nested inside of library QSYS. That’s as far as the nesting goes – you can only nest libraries in QSYS. With that said, here are some examples of devices and save files and their SAV command equivalents:
|SAVOBJ Device||SAV Device|
|Tape Drive – TAP01||/qsys.lib/tap01.devd|
|Tape Library – TAPMLB01||/qsys.lib/tapmlb01.devd|
|Save File – QGPL/MYSAVF||/qsys.lib/qgpl.lib/mysavf.file|
As you can see, the device names on the SAV command are a little more cumbersome to type. You see that we have to start by typing /qsys.lib, since that is the beginning of the file path for any object in the QSYS.LIB file system. All device descriptions are located in QSYS, so now we just need to type the name of the device and its .devd file extension. For tape drive TAP01, this would be tap01.devd.
Example of SAV command specifying a tape drive.
Specifying a save file only takes a little more work. So we start