× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This requires Groovy and JT400 but it writes out a pipe delimited file you could then pull into excel and put into a database of your choice or you could recode it to use jdbc and put it a database directly. It skips anything you get an error on because I live in a service bureau world and I'm not authorized to a lot of the jobds that get found.

If you run this on windows as a script you'll get prompted for the machine and your login credentials. IIRC if you run the script in the IFS it will use your currently logged in credentials on that box, but I haven't had IFS access to run Groovy for years.

import com.ibm.as400.access.*;

def system = new AS400();
def jobdList = new ObjectList(system, ObjectList.ALL, ObjectList.ALL, '*JOBD');

println 'JOBDLIB|JOBDNAME|LASTUSED|LIBRARY'
jobdList.getObjects().each() { objd ->
try {
def jobd = new JobDescription(system, objd.getLibrary(), objd.getName());
def objDate = objd.getValue(ObjectDescription.LAST_USED_DATE);
def fmtdDate = (objDate == null) ? '' : objDate.format('yyyy-MM-dd');
jobd.getInitialLibraryList().each() { lib ->
println objd.getLibrary() + '|' + objd.getName() + '|' + fmtdDate + '|' + lib;
}
}catch (e) {
}
}

jobdList.close();
System.exit(0);

coy
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Wednesday, May 08, 2013 07:59
To: Midrange Systems Technical Discussion
Subject: RE: JOBD analysis

Yes - that is my question. How to do step 1: "dump all job descriptions to a work file" ??


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Gary Thompson
Sent: Wednesday, May 08, 2013 9:47 AM
To: Midrange Systems Technical Discussion
Subject: RE: JOBD analysis

Joel,
1) dump all job descriptions to a work file
2) create table normaljd as (
select distinct jobd from workjobd )
with data
to get last-used date you will need to add detail to the above, but this should help get you going

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Wednesday, May 08, 2013 8:42 AM
To: 'Midrange Systems Technical Discussion'
Subject: JOBD analysis

I would like to dump all job descriptions to an *OUTFILE with their library list as a "normalized" file, ie one record for each lib in the *libl of the JOBD.

Also include last-used date of the JOBD.

The goal is to find out which JOBD's reference certain TEST libraries.

Any ideas how to accomplish?

Thanks



______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com ______________________________________________________________________
--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.



--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


________________________________________________________________________
This inbound email has been scanned for all viruses by the MessageLabs SkyScan
service.
________________________________________________________________________

______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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.