Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
has no ratings.
Published: 08 Mar 2013
Revised: 16 Mar 2013 - 1801 days ago
Last viewed on: 18 Feb 2018 (3915 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

QSRSAVO API User Space Published by: Bob Cozzi on 08 Mar 2013 view comments(2)

Return to midrangenews.com home page.
Sort Ascend | Descend


(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: QSRSAVO API User Space
Posted: 4 years 11 months 14 days 4 hours 31 minutes ago

A few years back I written table driven backup programs, with list of libraries (one per record, generic allowed), and ability to omit specific objects. From the tables, I'd build a command along the lines of SAVLIB LIB(x), appending an OMITOBJ((x/o *DTAQ)) if needed, then QCMDEXC.

I'm wondering now if the *USRSPC option would have been viable, even back then (I see it in V5R4 Info Center, which is when I wrote those backup programs). Is it as obvious as it looks? A Library Info (x), an Object Info (*ALL), and an Omit Object Info (the *DTAQ)?

Posted by: bobcozzi
Site Admin ****
Comment on: QSRSAVO API User Space
Posted: 4 years 11 months 14 days 3 hours 49 minutes ago

It is an array of "key" structs with the entire SAVLIB/SAVOBJ parameter settings stored in the data structure. You can then call QSRSAVO to run the save operation.

But they've added support in V5r4 for that data structure (i.e., the User Space) on the SAVLIB and SAVOBJ commands. So you can create it with just the omit objects (in my case) and then specify the user space name on the SAVLIB/SAVOBJ commands on the CMDUSRSPC parameter, along with OMITLIB(*USRSPC) OMITOBJ(*USRSPC).

It does do some checking but not sure if that was 'fixed' in last night's PTF update we did. Yesterday it was complaining that the minimum number of entries in the user space wasn't correct. I had 1 item (the omitlib list) but it said the minimum was 2.

I also embedded the device name (which is ignored by the SAVLIB/SAVOBJ commands) to bring it up to 2 items. I may try to take it out, but there's no point in doing that as it is benign. 

Now I'm going to port it over to one of our v5r4 machines and see if it still works.