• 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
    ARCAD Software

    WEBINAR
    Unit Test Automation: Secure Application Quality on IBM i
    April 15, 12 p.m. EDT, 5 p.m. BST

    Unit testing is arguably the most effective element of your testing strategy, driving the quality of your application as it is being developed.  Yet how can unit testing benefit legacy applications on IBM i – and especially those containing ‘monolithic’ sections of code?

    In this Webinar we will demonstrate how specialized unit test automation can safeguard application quality and generate reusable test assets for both modular and monolithic code.

    You will learn how to automate the IBM i unit testing process within a standard DevOps stack., including RDi, JUnit and Jenkins.

    Using ARCAD iUnit, you’ll see:

    • Automated test creation for modules, programs and service programs
    • Code coverage results
    • Mock capability – simulates key components like data, files programs
    • Test execution history
    • Version control with Git

    Register today and secure the quality of your IBM i application.

    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

  • Query Supervisor Gives Database Engineers New Power
  • IBM Unveils New and Improved IBM i Services
  • 3 Takeaways from the 2021 PowerTech Security Report
  • Four Hundred Monitor, April 14
  • IBM i PTF Guide, Volume 23, Number 15
  • Big Blue Unveils Spring 2021 IBM i Technology Refreshes
  • Thoroughly Modern: Innovative And Realistic Approaches To IBM i Modernization
  • Guru: Web Services, DATA-INTO and DATA-GEN, Part 2
  • Back To The Future With A New IBM i Logo
  • IBM i PTF Guide, Volume 23, Number 14

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 © 2021 IT Jungle

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.