Thanks for other select options, I may use in the future.

I changed the SQL slightly, to run in batch, via AJS.

Cause . . . . . : Command to execute is: RUNSQL REQUEST('select * from
qgpl/QASYJSJ5 where locate (''ARPINS2'',JSLIBL ) <> 0') OUTPUT(*PRINT).

But now I got 33 1 line spoolfiles (see below), not the expected result.

Any suggestions for batch.

. Library Time Exit Exit Exit Exit Exit
ASP JOBD ASP JOBD ASP zone job job job program program JOBQ ASP JOBQ ASP
group name number name name user number name library name number
------ ---------- ---------- -------- ---------- ---------- ---------- ------ ---------- ---------- ---------- --------
07/16/14 00:29:40 1(33)


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Wednesday, July 16, 2014 11:31 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Scaning field JSLIBL from QAUDJRN outfile QASYJSJ5

On 15-Jul-2014 23:11 -0500, Steinmetz, Paul wrote:

I used your example, simplified.

select * from qgpl/QASYJSJ5 where locate ('ARPINS2',JSLIBL ) <> 0

ARPINS2 is a library to be deleted.
SQL returns nothing found.

If there is any doubt or uncertainty with the result set of that specific query, then the effective equivalent could be performed also:

select * from qgpl/QASYJSJ5 where JSLIBL LIKE '%ARPINS2%')

There are also other similar non-SQL means to easily perform the "same" inquiry; e.g. further validation, to be more sure the token does not exist in that data:


DSPPFM qgpl/QASYJSJ5 /* F16=Find _after_ using F14=Find Options to specify that the search is case sensitive, the column positions for the JSLIBL field (are ¿729 to 1158?), and the search token is: 'ARPINS2' */


Based on this, library ARPINS2 has not been used in any job since
March 20, 2014.

Is my logic and findings conclusive?

Presuming first, that the audit journal output includes the T-JS entries do indeed span that era; perhaps.

I have not used that specific data before, but what I seem to recall about the T-JS, may not match your understanding; I infer that the empty result set of the query suggests only that the named library has never been part of the *LIBL within a job that has been *started* [or transitioned across a captured job status; e.g. CHG, HLD, RLS, DSC, etc.] on the system over that period. Do the effects of every EDTLIBL, ADDLIBLE, CHGSYSLIBL, and CHGLIBL request, also generate a T-JS with the updated Library List data appearing in the JSLIBL column of the DSPJRN [or deprecated DSPAUDJRNE, or CPYAUDJRNE] output? If not, using only that data and selection criteria, seems tenuous for considering the library eligible for deletion; though I suppose acceptable, if also the library is currently empty and has not /changed/ since then, such that no objects could have been inserted and removed [and thus seemingly /remained/ empty] over that period.?

Regards, Chuck
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page