Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8189
Location: East Dubuque, Illinois, USA

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: 1532
Location: Chennai

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 query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 0 Wed Nov 22, 2017 10:23 pm
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 6 Sun Nov 19, 2017 7:59 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 4 Wed Nov 15, 2017 4:27 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us