View previous topic :: View next topic
|
Author |
Message |
Anbutheone
New User
Joined: 08 Oct 2008 Posts: 15 Location: Bangalore
|
|
|
|
In our application, batch jobs are running.
Is there a jcl or rexx code to find out whether the job is run or not on a particular day?
PS: The output is copied into CA7-view(SAR). We have to update a file which contains the list of job names, as run or not. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Anbu,
Quote: |
s there a jcl or rexx code to find out whether the job is run or not on a particular day?
|
what kind of job is that? Is it creating any output files? If yes, you can check the availability of those datasets to confirm whether the job has run.
Else if the job name is unique, u can write a REXX to submit SDSF in batch to access the spool and the contents of the DD. You can check for today's date and all. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Can you check the scheduler to see if the job ran?
As a last-ditch effort, you could hit the SMF records to find out if the job ran. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Not sure this is the efficient way, but this works
Find out in which mainframe image the SAR database resides and access it via batch.
With the SAR details determine if the job has run using REXX.
Quote: |
As a last-ditch effort, you could hit the SMF records to find out if the job ran. |
Digging SMF records will also be equally interesting.
U can access the individual SAR reports in batch via GEN and SEQ parameter.
Or u can also access them like a GDG, through relative reference. -1,-2,-3 like that.
In our shop we use the below JCL to extract SAR details.
The program SARBCH might be different in your shop.
Code: |
//UNLOAD EXEC PGM=SARBCH,PARM='SAR.SARI01'
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133
//REPORT DD SYSOUT=*,DCB=BLKSIZE=133
//SARLOAD DD DSN=XK89.BORED.PROGRAMR,DISP=OLD
//SYSIN DD *
/LOAD ID=DLEN-AU20
/* |
|
|
Back to top |
|
|
Simon Jia
New User
Joined: 21 Nov 2008 Posts: 5 Location: China
|
|
|
|
You need to address sdsf command from rexx program.
If you are not familiar with addressing sdsf in rexx program, you should try this one:
Online education for sdsf rexx execution
I completed this using less than 20 minutes and I created my own rexx program invoking sdsf.
Basically you should use the jobname/jobid as a key, then get an array with the job info, iterate the items in the array to find which one is the correct job, then output the job messages, then evaluate the messages to see if it contains some keywords like "HASP ENDED" etc. |
|
Back to top |
|
|
|