I'm going to chime in as well. I created a UDTF using
QWDRJOBD api which does go very well with OBJECT_STATISTICS table function.

This makes it very easy to scan JOBD's for libraries.

I mentioned to Scott Fortsie that this would be a good DB2 for i Service to add, so I'm sure it will be in an upcoming TR.

Jim

________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Musselman, Paul <pmusselman@xxxxxxxxxxxxxxxx>
Sent: Wednesday, October 11, 2017 4:38 PM
To: Midrange Systems Technical Discussion
Subject: RE: Scouring job descriptions for soon-to-be deleted libraries

We wrote a program to allow us to do make changes to jobd LIBLS. Unfortunately, it was never updated beyond the original 25 (?) libs permitted in the old days. Mainly because we haven't had to perform major surgery on LIBLs for a long time!

First step-- find them! DSPOBJD to an outfile, searching all libraries you think might hide a JOBD.

Second- Read the file created by DSPOBJD and RTVJOBD - this was an antique command from the old 'free' TAATOOL that used to come with the operating system. This returned the library list (and was limited to 275 bytes of data-- the 25 library limit)

The TAATOOL uses a call to API program QSYS/QWDRJOBD. Looking at the source code, it appears that you hand the program the name of a JOBD, and it returns the LIBL (format JOBD0100). See https://www.ibm.com/support/knowledgecenter/en/ssw_i5_54/apis/qwdrjobd.htm for details of the program.

Third-- scan the list of libraries (or stuff it into an array) and compare the library you want to change or remove. We could swap libraries or remove them from the JOBD. Build a new string and update the JOBD.

Taking a quick look at our code, the TAATOOL was useful because it was pre-packaged. It returned a text string with all of the libraries. But QWDRJOBD is a relatively 'simple' API-- it doesn't appear to need a User Space defined-- you pass the information to the API and it hands you back a string with all sorts of stuff in it! It tells you where in the string the list of libraries begins, and how many libraries there are. It's up to your program to only look for that many libraries!

Paul E Musselman
--PaulMmn@xxxxxxxxxxxxx<mailto:--PaulMmn@xxxxxxxxxxxxx>


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Beard
Sent: Wednesday, October 11, 2017 1:29 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Scouring job descriptions for soon-to-be deleted libraries

Is there a query or anything I can run to take a list of job descriptions
and see if they contain a library in them that we want to remove from the
system? I am formulating a shell script to do this but in order to improve
my CL and general command use, I'd like to do it that way instead.

--
Kelly Beard


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.