MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to check if a job is running in shared JES2

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
fow0ryl
Beginner


Joined: 29 Jun 2017
Posts: 1
Topics: 1

PostPosted: Thu Jun 29, 2017 11:36 pm    Post subject: How to check if a job is running in shared JES2 Reply with quote

Hello,

we are running 2 mainframes with a shared jes2 environment.
The application uses a centralized "submit" module for submitting jobs within cobol programs. The module is used in TSO-Batch, CICS and IMS enviroment. In fact it reads DB2 and DL/I Entry's, creates a job and copies the job to the internal reader.

If the calling application has an error it is possible that the application calls the submit-module in a loop.
Then all initiators went busy and no other job's can be run.
This end's up in a phone ringing loop, created by the operating Wink

The job now is to change the submit-module. It should check if the requested job is alway's running, or waiting for execution. And if possible how many job's are submitted. All this regardless of the machine the submit-module is running on, or the user who has started the job.

My idea is to have a look in the mvs control blocks to get the information.
Currently I have started at the PSA, found the address of the CVT and then looking in the ASVT.
But no luck. If the module is running on the same machine as the job, the entry can be found. But if the job is running on the other machine, it can't be found by this method Sad

Anybody out to help me?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Fri Jun 30, 2017 11:09 am    Post subject: Reply with quote

fow0ryl,

Are you submitting with the same Jobname when there is a failure? or is it a different name ?

Ways to handle.

You can invoke SDSF and look at the DA queue for the job name and if you find, code a wait or submit the job with a HOLD.

here is a sample

Code:

//**************************************************************
//STEP0100 EXEC PGM=IEFBR14                                     
//DD01     DD  DSN=&SYSUID..SDSF.OUTPUT,                       
//             DISP=(MOD,DELETE),UNIT=SYSDA,                   
//             SPACE=(TRK,(1,0),RLSE)                           
//*                                                             
//**************************************************************
//* EXTRACT THE ENTIRE JOB OUTPUTS IN DA FOR PREFIX 'fow0ryl'   *
//* USING SDSF BLOCK COMMANDS (//X - //)                       *
//**************************************************************
//STEP0200 EXEC PGM=SDSF,PARM='++30,256'                       
//ISFOUT   DD SYSOUT=*                                         
//SYSUDUMP DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//SYSTSPRT DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//DATAOUT  DD DSN=&SYSUID..SDSF.OUTPUT,                         
//            DISP=(NEW,CATLG,DELETE),                         
//            SPACE=(CYL,(25,25),RLSE),                         
//            RECFM=FB,LRECL=133,BLKSIZE=0                     
//ISFIN    DD *                                                 
PRE fow0ryl*                                                     
DA                                                             
PRINT FILE DATAOUT                                             
FIND 'fow0ryl'                                                   
++//X                                                           
FIND 'fow0ryl' LAST                                             
++//                                                           
PRINT CLOSE                                                     
END                                                             
/*     

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group