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
 
Reading mainframe job spool while the job is running

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

New User


Joined: 27 May 2009
Posts: 10
Location: Hyderabad

PostPosted: Wed Jan 09, 2019 9:48 am    Post subject: Reading mainframe job spool while the job is running
Reply with quote

Hi ,
Is there a way to read mainframe job spool while the job is running?

My requirement is ,there is an existing job running for 24/7 and my new job should read the existing job's spool and it should alert me if it finds specified messages in the spool.

Thanks,
Manohar
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2088
Location: NY,USA

PostPosted: Wed Jan 09, 2019 10:49 am    Post subject:
Reply with quote

It must be a CICS region job which runs for 24/7 and your new job should also run then for 24/7 to alert you as soon as you get what you looking for , is it ?

At this point see if ISFAFD utility helps or look for any batch sdsf way here.
https://www.ibm.com/support/libraryserver/BOOKS/ISF1GR00/CCONTENTS?DT=19970129154852

How about getting the output in a dataset instead of spool and then look into it in easy way by dfsort or rexx or cobol program , is it feasible and durable option ?

Don’t forget to check with scheduling team if they have any way to achieve it without much of a change.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8752
Location: Welsh Wales

PostPosted: Wed Jan 09, 2019 12:56 pm    Post subject:
Reply with quote

Not necessarily a CICS region, there may be other applications that run 24/7, DFhsm for example.

Does your shop have something like NETVIEW or another software package that can do this. From experience I have found that a proprietry package works far more efficiently than anything home grown.

I did once write a REXX that sat there looking for required responses for DASD initialisations, and it was grossly inneficient, but it saved the operators having to monitor the screen and reply "U" 64 times
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 257
Location: Denmark

PostPosted: Wed Jan 09, 2019 3:32 pm    Post subject:
Reply with quote

This has been discussed a number of times. REXX using the SDSF API can do it like this:
Code:
 n=isfcalls('ON')                                                     
                                                                     
 /* set isfprefix = jobname */                                       
 isfprefix='RMF'                                                     
 say 'Looking for:' isfprefix                                         
 Address  SDSF                                                       
 "ISFEXEC ST"                                                         
 if rc<>0 then call SdsfErr 'ST'                                     
 ap=0                                                                 
 do i=1 to jobid.0                                                   
   if queue.i='EXECUTION' then ap=i                                   
 end                                                                 
 if ap=0 then exit xmsg('Job not found',8)                           
                                                                     
 "ISFACT ST TOKEN('"TOKEN.ap"') PARM(NP SA)"                         
 if rc<>0 then call SdsfErr 'ST NP SA'                               
 do jx=1 to isfddname.0                                               
 /*Say "Dsname" isfddname.jx isfdsname.jx  */                         
   if right(isfdsname.jx,8)='JESMSGLG' then do                       
     say 'read...'                                                   
     address tso "EXECIO * DISKR" isfddname.jx "(STEM line. FINIS)"   
     if rc<>0 then exit xmsg('read rc' rc,8)                         
     Say " Lines read:" line.0                                       
     do kx = 1 to line.0                                             
       Say line.kx                                                   
     end                                                             
   end                                                               
 end                                                                 
 exit xmsg('Ok')                                                     
                                                                     
SdsfErr:                                                             
 say arg(1)':' isfmsg                                                 
 say isfdisplay                                                       
 do  i=1  to  isfmsg2.0                                               
   say isfmsg2.i                                                     
 end                                                                 
 exit 12                                                             
XMsg: if arg(1)<>'' then say arg(1);return word(arg(2) 0,1)           
Back to top
View user's profile Send private message
jilumudi_manohar

New User


Joined: 27 May 2009
Posts: 10
Location: Hyderabad

PostPosted: Thu Jan 10, 2019 4:29 am    Post subject:
Reply with quote

Thanks Rohit and Expat for the replies.
Hi Willy,
I will implement this logic for my requirement and get back to you If I face any issues.

Thanks for the help.

Regards,
Manohar
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 calling java code(on mainframe from c... elixir1986 COBOL Programming 1 Fri Nov 30, 2018 1:57 am
No new posts SFTP connection to Mainframe Shinoj Vijayakumar TSO/ISPF 4 Thu Nov 15, 2018 2:02 pm
No new posts Mainframe + Card domain exp. req. 5-6... capricorn Mainframe Jobs 0 Wed Oct 24, 2018 5:10 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts 3-6 years - Mainframe Opennings in HS... Saikat Sengupta Mainframe Jobs 0 Mon Oct 22, 2018 2:57 pm

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