Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
QSRSAVO API User Space
has no ratings.
Published: 08 Mar 2013
Revised: 16 Mar 2013 - 1676 days ago
Last viewed on: 17 Oct 2017 (3547 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)

Wow, this one was perplexing.

I had a requirement to create a nightly backup that was effectively static, and included LIB(*ALLUSR).  However, as more development libraries are created, they wanted the ability to omit these unnecessary development libraries from the backup.

I've been looking at QSRSAVO for a day or so because on the SAVLIB and SAVOBJ commands there is a new parameter CMDUSRSPC (Command User Space) that may include the omit list. However formatting it is a be daunting.

But after a few hours, I managed to get it working and all is well. The side effect is that I also lost my Virtual Tape cherry which was good.

I'll be including this feature in COZTOOLS free RT library in the next point release. But right now it only sets the omit list (no way to change it, just replace it). Once I create ADDSAVLE/RMVSAVLE  (Add/Remove Save List Entry) in addition to the CRTSAVL that I've already built, I'll feel better about publishing it.

Let me know if this is something people are interested in utilizing.

 

 

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

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: QSRSAVO API User Space
Posted: 4 years 7 months 10 days 13 hours 17 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 ****
Chicagoland
Comment on: QSRSAVO API User Space
Posted: 4 years 7 months 10 days 12 hours 35 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.