Saving IFS Objects: How to Specify a Device or Save File

Savings objects from the Integrated File System (IFS) is not quite as straightforward as saving them from the QSYS.LIB file system using commands such as SAVOBJ and SAVLIB. For example, a SAVLIB command has a parameter called DEV where you can simply specify the name of the device you want to use for the save. This could be a tape drive like TAP01 or a tape library like TAPMLB01. It could also be a save file, in which you would specify *SAVF and then the name of the save file on the SAVF parameter.


Examples of a SAVLIB command.

We save our customers hundreds of hours and thousands of dollars each year.

The team at iTech has over 40 technical certifications, boasts 3 IBM Champions, and has a team with over 900 years of combined IBM i experience.

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 DeviceSAV 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 with /qsys.lib. Then, if the name of the library the save file is located in is QGPL, we would type /qgpl.lib. Lastly, if the name of the save file was MYSAVF, we would type mysavf.file. Save files have a .file file extension.

Example of SAV command specifying a save file.

Once you’ve got your device specified properly, you can then save any directory on the system using the SAV command. Also note that the device here is not case-sensitive. All directories on IBM i are also not case-sensitive, with the exception of the /QOpenSys directory which is case-sensitive. Keep that in mind when saving objects from that directory.

4 thoughts on “Saving IFS Objects: How to Specify a Device or Save File”

  1. Hi came across your article as was wondering if you knew why this is happening when running the SAV command. Its adding the HOME DIRECTORY of the user profile to the device parameter. Tried with a tape drive and a save file and get the same error. thanks.

    Object not found. Object is /home/QPGMR/QSYS.LIB/TAP01.DEVD.
    Specified value on DEV parameter not valid.

    1. Steven L McIver

      It might be a slight syntax error on the dev parameter:

      You are putting: DEV(‘QSYS.LIB/TAP01.DEVD’)

      Make sure to include the beginning slash: DEV(‘/QSYS.LIB/TAP01.DEVD’)

Leave a Comment

Your email address will not be published.