Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL/REXX code to find whether a batch job run or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Thu Nov 13, 2008 3:32 pm    Post subject: JCL/REXX code to find whether a batch job run or not
Reply with quote

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
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 13, 2008 5:57 pm    Post subject: Reply to: JCL/REXX code to find whether a batch job run or n
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7935
Location: Bellevue, IA

PostPosted: Thu Nov 13, 2008 6:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Mon Nov 17, 2008 3:07 pm    Post subject:
Reply with quote

Not sure this is the efficient way, but this works icon_smile.gif

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
View user's profile Send private message
Simon Jia

New User


Joined: 21 Nov 2008
Posts: 5
Location: China

PostPosted: Fri Nov 21, 2008 9:41 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us