|
Mike, I created for this reason a procedure (called yJobLst) where I can specify a subsystem as well as other select options. The output is a list of jobs with their most important attributes (Jobname, Nbr, User, IntId, Status, ActJobSts, Type and subsystem). The list is limitted to 978 Jobs per request as it is a returnvalue with varying length of 65531 bytes. Internally the procedure uses the API QUSLJOB and for retrieval of the subsystem - if subsystem was selected - the API QUSRJOBI. The usage of this procedure looks like: RPG example source code for using this procedure * Prototype D yJobLst PR Like($RtnJobLst) D p$JobNam 10A Const D p$User 10A Const Options(*NoPass) D p$JobSts 10A Const Options(*NoPass) D p$JobType 1A Const Options(*NoPass) D p$Sbs 10A Const Options(*NoPass) * Field Definitions * Returnvalue D $RtnJobLst DS D r$Nbr 5I 0 D r$JobLst 65531A Varying D $GEMDS E DS ExtName(YGEMDS) Qualified * List Elements D $JobLst DS Qualified D Job 10A D User 10A D JobNbr 6A D IntId 16A D Sts 10A D ActJobSts 4A D Type 1A D SubSys 10A // Call Procedure (this example returns all active jobs from user NOLL) $RtnJobLst = yJobLst('*ALL':'NOLL':'*ACTIVE'); // Retrieve entries from list Select; When r$Nbr > *zeros; i2 = 1; For i1 = 1 to r$Nbr; $JobLst = %subst(r$JobLst:i2:%size($JobLst)); Values available in DS. Qualified DS !! i2 = i2 + %size($JobLst); EndFor; When r$Nbr = *zeros; // No job found When r$Nbr = -1; // Processing on error $GEMDS = r$JobLst; EndSL; I didn't find any other way to get retrieved the jobs of a certain subsystem. If you are interested in the source code, please send me a personal message (out of this list). The code needs V5R2!! Kind regards, GEFIS Gesellschaft für Individual-Software mbH Werner Noll -----Ursprüngliche Nachricht----- Von: Mike Silvers [mailto:msilvers@xxxxxxxxxxx] Gesendet: Mittwoch, 26. Februar 2003 18:51 An: rpg400-l@xxxxxxxxxxxx Betreff: API Listing jobs in a subsystem Does anyone know the name of the API that will list all active jobs within a specific subsystem? If so, does anyone have an example for this API? Thanks, Mike ======================================= Mike Silvers Senior Programmer/Analyst IBM Certified Expert Hainey Business Systems Main Office: (717) 718-9601 ext 237 Branch Office: (410) 901-9015 http://www.hbs-inc.com AIM: IBMJavaMan ======================================= _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.