Page 1 of 1

Jobcheck - How to check if a job is completed (without SDSF)

PostPosted: Thu Sep 29, 2016 7:56 pm
by cvcv
Hi,

I submit a job that runs REXX and then generates another job. So Job#1 runs, and using REXX, it generates and submits Job#2.

In Job#1, I was trying to determine when Job#2 has run and ended successfully.

I tried using REXX SDSF, but it doesn’t not seem like it is install here. We have IOF

Is it even possible to find a specific job and see if it ended successfully? Or it is only possible to see if a job is active or not?

I found this excellent piece of code which tells you if a task is active or not: http://www.mzelden.com/mvsfiles/jobchkrx.txt

I'm wondering if it's possible to know, using similar code, to see if a task (job) ran and is now completed successfully. The best would be to check the job status of a job that started after a specific datetime.

Any help would be appreciated, Thanks
cvcv

Re: Jobcheck - How to check if a job is completed (without S

PostPosted: Thu Sep 29, 2016 9:29 pm
by enrico-sorichetti
why You do not want to use Your scheduler facilities ?

nobody will waste time giving suggestions on how to write Your own job scheduling system

Re: Jobcheck - How to check if a job is completed (without S

PostPosted: Thu Sep 29, 2016 10:07 pm
by cvcv
I could look manually in IOF and see if Job#2 is done. I'm trying to do this automatically. I had some good ideas for using SDSF until I realized it's not even installed here.

Not asking anyone to waste time.

Re: Jobcheck - How to check if a job is completed (without S

PostPosted: Fri Sep 30, 2016 2:03 am
by NicC
Generate the jobcard with the NOTIFY parameter then you will get notified when the job finishes and how it finished - OK, abend, non-zero return code, jcl error.

Re: Jobcheck - How to check if a job is completed (without S

PostPosted: Sat Oct 01, 2016 1:53 am
by Robert Sample
Not asking anyone to waste time.
Actually, this is not true. Your statement
I could look manually in IOF and see if Job#2 is done. I'm trying to do this automatically.
means you are attempting to develop your own job scheduler -- since one of the functions of a job scheduler is to automatically monitor job completions. Most sites have job schedulers already, so there is no reason for you to duplicate the work. Use the job scheduler already installed at your site. If you don't have one installed (rare but it does occasionally happen), or if you cannot use yours for whatever reason, you need to give up on the entire concept of automatically being notified about job completion. Or plan on spending plenty of time working it out -- and the first step for you would be to find the IOF interface manual and see if what you want to do is even possible. We do not encourage such activities on this forum is it is nearly always a waste of time.