• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • What’s In A Save File?

    October 4, 2016 Ted Holt

    Note: The code accompanying this article is available for download here.

    Juliet wondered, “What’s in a name?” Ted wondered, “What’s in a save file?” The Display Save File (DSPSAVF) command would show me only so much, so I wrote a utility to give me more information. Maybe it will be helpful to you.

    It’s common for me to exchange save files with other IBM i professionals. One problem I often run into is that someone (who might be me) cannot restore a save file to their system because the save file was created for a more recent release of IBM i. I needed a way to determine this information, and DSPSAVF did not have it. Fortunately, IBM’s QSRLSAVF API lists more information than what DSPSAVF shows.

    My utility is called Print Save File, and it consists of three objects:

    Name

    Type

    Attribute

    Description

    PRTSAVF

    *CMD

     

    The
    command interface

    PRTSAVF0

    *PGM

    CLLE

    The
    command-processing program

    PRTSAVF1

    *PGM

    RPGLE

    The report
    program

    It also requires Brian Rusch’s magnificent message-forwarding commands, MOVPGMMSG and RSNESCMSG, which were published in the May 2, 2012, issue of Four Hundred Guru.

    Here’s a sample of the report.

    Save file: *LIBL/BASSSAVSRC
    --- Input Parameter Section ---
    User space ............: PRTSAVF000
       Library ............: QTEMP
    Format ................: SAVF0100
    Save file .............: BASSSAVSRC
       Library ............: *LIBL
    Name filter ...........: *ALL
    Type filter ...........: *ALL
    Continuation ..........: 404040404040404040404040404040404040404040404040404040404040
    --- Header Section ---
    User space ............: PRTSAVF000
       Library ............: QTEMP
    Save file .............: BASSSAVSRC
       Library ............: THOLT
    Continuation ..........: 404040404040404040404040404040404040404040404040404040404040
    --- General Information (SAVF0100) ---
    Library ...............: BASSSRC
    Command ...............: SAVOBJ
    Save date/time ........: 2016-06-01 08:13:39
    ASP ...................: 1
    Records ...............: 1968
    Objects ...............: 1
    Access paths ..........: 0
    Save while active .....: *NO
    Release ...............: V7R1M0
    Compressed ............: 0
    Serial number .........: BR-549
    Private authority .....: 0
    ASP name ..............: *SYSBAS
    Members ...............: 26
    Spooled files .........: 0
    Sync ID ...............: *NONE
    --- Objects (SAVF0200) ---
    --- 1 ---
    Object ................: BASSSRC
    Library ...............: BASSSRC
    Type ..................: *FILE
    Attribute .............: PF
    Save date/time ........: 2016-06-01 08:13:39
    Size ..................: 1216512
    Multiplier ............: 1
    ASP ...................: 1
    Data saved.............: 1
    Owner .................: QPGMR
    DLO name ..............:
    Folder ................:
    Text ..................: BASS source code
    ASP name ..............: *SYSBAS
    --- Members (SAVF0300) ---
    --- 1 ---
    File ..................: BASSSRC
    Library ...............: BASSSRC
    Member ................: PSDS
    Attribute .............: PF
    Save date/time ........: 2016-06-01 08:13:39
    Members ...............: 26
    --- 2 ---
    File ..................: BASSSRC
    Library ...............: BASSSRC
    Member ................: PASS1PROTO
    Attribute .............: PF
    Save date/time ........: 2016-06-01 08:13:39
    Members ...............: 26
    --- 3 ---
    File ..................: BASSSRC
    Library ...............: BASSSRC
    Member ................: PASS2PROTO
    Attribute .............: PF
    Save date/time ........: 2016-06-01 08:13:39
    Members ...............: 26
    ///////////////////////////
    --- 26 ---
    File ..................: BASSSRC
    Library ...............: BASSSRC
    Member ................: BASSPASS2
    Attribute .............: PF
    Save date/time ........: 2016-06-01 08:13:39
    Members ...............: 26
    --- Spooled files (SAVF0400) ---
    ** End of report **  Status=00
    

    The report begins with general information about the save file. This is followed by objects, file members, and spooled files.

    Here are a few things to be aware of.

    • Even though I wrote to a printer file, I did not code for overflow processing. I rarely print anything to paper anymore, and this is not the sort of thing I would ever want to save a hard copy of.
    • The list API’s allow for a continuation handle to tell whether all or only some information has been retrieved. I couldn’t make this continuation handle return anything but blanks, so I didn’t deal with it. I suspect you’d have to have a mighty large save file to overflow the user space to which the system writes the data.
    • Even though the QSRLSAVF API gives more information that DSPSAVF does, it doesn’t show everything about the saved objects, file members, and spooled files. I printed everything I could find to print, and that’s been adequate for my needs.

    Feel free to improve it.

    Ted Holt welcomes your comments and questions. Email him through the IT Jungle Contacts page.

    RELATED STORY

    CL Error-Handling With APIs

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Rocket Software

    Unlock the full potential of your data with Rocket Software. Our scalable solutions deliver AI-driven insights, seamless integration, and advanced compliance tools to transform your business. Discover how you can simplify data management, boost efficiency, and drive informed decisions.

    Learn more today.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    BCD:  Webinar: Rapid Node.js Web and Mobile Development with WebSmart. Oct. 6 at 1pm ET.
    Fresche:  IBM i staffing for all of your IT needs. Request a FREE estimate. 1-800-361-6782
    Manta Technologies Inc.:  The Leader in IBM i Education! Download catalog and take sample sessions!

    Two Fall Conferences Are Must-See IT IBM i Tech Refresh Arrives; JSON And Perl In Spotlight

    Leave a Reply Cancel reply

Volume 16, Number 22 -- October 4, 2016
THIS ISSUE SPONSORED BY:

WorksRight Software
COMMON
UCG Technologies

Table of Contents

  • A Style Guide For Modern RPG And ILE, Part 1
  • What’s In A Save File?
  • Searching Source In The Twenty-First Century

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle