job status

10 pts.
Tags:
as400 js WRKHSTJS
CL
SDA
we have one thousand jobs of which we have 4 critical jobs called jobA(emp), jobB(desig), JobC(sal), jobD(dept)  once jobA completes jobB kicks off and so on based on the job status i need to display a message on the user defined screen (DSPF) showing the current status  if   jobb is running "desig job is running" or if jobC abended  "sal job is abended" and so on.

instead of going to WRKHSTJS and searching for these jobs the jobs status should be displayed on the screen.

please share a sample CL, dspf creation  code





Software/Hardware used:
as400, cl, sda JS
ASKED: March 17, 2010  7:07 PM
UPDATED: March 19, 2010  9:11 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

SO, fundamentally, you want to emulate what an operator would do

WRKACTJOB, find the job, check its status.

You have defined job names

So write a function which will retrieve the jobs (There’s an API for this) and check for the jobs you are interetsed in. place the results in a data area.

put your job in the backgound, configurable to check at 2 minute intervals, or whatever, if a joh is unhappy, send email alerts, or text messages.

Provide a function which displays the data area(s) on screen, which can be called at any time, anywhere. Show the jobs on screen – green for OK, Flashing Red if the job is not there or on a message.

There is plenty of API example stuff on the ‘net, a bit of thought, with cut and paste, will get you there.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Please show the ADDJOBJS or SBMJOBJS commands that apply to these four jobs. Without knowing what attributes are associated with the jobs, the reasonable possibilities vary wildly. (They vary wildly anyway, but some job attributes can make things far easier.) If any default values for the parms on those commands have been changed, they also need to be disclosed. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Explanatory follow-up -- A submitted job has (or at least can have) a message queue assigned to it at the time of submission. This message queue is intended to receive completion messages concerning the submitted job. If message queues are assigned to these jobs, one potentially complicated task can be simplified, e.g., it's easy to tell when one of the four jobs ends. Also, the Advanced Job Scheduler itself includes a number of possible "notification" elements. If and how those elements are specified will change the likely solutions. If no job attributes are useful, then the Job Notification Exit Point can have a generalized exit program assigned that filters out entries for only these jobs. The exit point might be used anyway, but it might not be needed. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following