retreiving Job information (command String) for jobs waiting in job queues on an Iseires
135 pts.
0
Q:
retreiving Job information (command String) for jobs waiting in job queues on an Iseires
When we submit a job on an Iseries to a job queue, it gets submitted with a command string. I have a process where I am using APIs to go out and get information on jobs that are on our job queues that are waiting to run. The APIs that I use work great but they do not show me the command string that is associated to a job. After I get the job info I have to do a DSPJOB JOB(&NUMBER/&USER/&JOBNAME) OUTPUT(*PRINT) + OPTION(*JOBLOG) Then I copy it to a spool file and read that file for the command string info. This is time consuming because we get thousands of jobs submitted. Does any one know of a better and or quicker way of doing this? I looked in the Retrieve Call Stack (QWVRCSTK) API but it does not give me the detail the I need. Any help at all is very much appreciated.
ASKED: Sep 1 2009  7:11 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
135 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Rather than dumping the joblog to an output queue have you considered replacing that logic with calling either the List Job Log Messages (QMHLJOBL) API or the Open List of Job Log Messages (QGYOLJBL) API? I haven't had a chance to test either for your situation but they should do the trick.

Another approach, and one that I have used in the past but which would mean more change to your current process, is be to use the Command Analyzer Retrieve Exit Program exit point. You could register your exit program with the SBMJOB command and simply be passed the relevant data (in keyword format) as a parameter.

Any of the above would certainly be more direct (and even supported!) than going through a spool file.

There are probably some other ways to accomplish your task, but those are the ones that come to mind.

Bruce Vining
Bruce Vining Services



Thanks for your input. I will try these.
Last Answered: Sep 10 2009  2:19 PM GMT by ISERIESTECH   135 pts.
Latest Contributors: Bvining   4875 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Yorkshireman   3200 pts.  |   Oct 19 2009  11:49AM GMT

I’d go the simple route, and have each submitter write its command string to a file, which you could then use to generate some metrics, and even update at end of job with CPU seconds used etc..

 
0