• 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
    COMMON

    There is only one place for Power Systems and IBM i education this fall:
    COMMON's Fall Conference & Expo in Columbus, Ohio.
    Do not miss the premier fall educational event.

    Over 100 sessions, organized into 15 Courses of Study, await this year's attendees.
    New sessions cover topics such as PhoneGap, Jasper Reports, SQL cursors
    and cloud virtualization. Review the schedule to discover more and
    to build a plan to meet your educational needs.

    In addition to education, there will be plenty of opportunities to meet your peers
    and build your professional network. Spend time in the Expo area to see
    the latest products and services that may benefit your business.

    Finally, do not miss the UI Modernization Challenge. New for 2016,
    the challenge will allow you to evenly compare several modernization solutions.

    For more information and to register, visit:
    www.common.org/fallconference
    .

    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

Recent Posts

  • Big Blue Finally Brings IBM i To Its Own Public Cloud
  • Building A Positive Culture of Learning On IBM i
  • Guru: Change XML Elements in SQL
  • Four Hundred Monitor, February 18
  • IBM i PTF Guide, Volume 21, Number 7
  • Guru Classic: Triggers – Allow Repeated Change
  • Guru Classic: Who Needs Custom Perspectives In RDi?
  • Guru Classic: A Bevy of BIFs — %CHAR, %EDITC and %EDITW
  • Settling In With IBM i For The Long Haul
  • Domino And Notes 10 Finally Come To IBM i

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 © 2017 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.