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
 

 

fetching Job details from spool using a jobname

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Fri Jul 13, 2012 11:38 pm    Post subject: fetching Job details from spool using a jobname
Reply with quote

Hi all,

I need to know if there is way to find out if a particular job is running and find the details of it like use who submitted the job.


If there are duplicate jobs running in spool, i should only pick the one that is active. Does someone have this or is there any link to guide me on this task ?
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1770
Location: Bloomington, IL

PostPosted: Sat Jul 14, 2012 12:18 am    Post subject:
Reply with quote

The manual for your system management product (SDSF, IOF, (E)JES) will include a description of the Rexx interface.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jul 14, 2012 12:58 am    Post subject:
Reply with quote

Hello,

Is there some reason to use Rexx when you can simply display the info you want online?

If you explain what you are really trying to accomplish, someone may be aboe to offer a suggestion.
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Sat Jul 14, 2012 2:25 am    Post subject:
Reply with quote

Thanks for the quick response Dick.

I was able to solve this be referring to previous posts on this forum.


Basically we have a job that authorizes another job. This job basically checks the user id of both jobs are different to allow to proceed.


I am half done (trying to find the variable owner id here); This is wat i have till now -


Code:
 /*REXX*/                                       
                                                 
     RC=ISFCALLS("ON")                           
     ISFOWNER  = 'S0DPDCT7'                     
     ISFFILTER = 'PHASENAME' EQ 'EXECUTING'     
     ADDRESS SDSF "ISFEXEC ST"                   
     IF RC<>0 THEN EXIT 20                       
     SAY JNAME.0                                 
     IF JNAME.0 < 1 THEN EXIT 20                 
                                                 
     DO I=1 TO JNAME.0                           
         SAY 'JOB:' JNAME.I   OWNERID.I         
     END                                         
                                                 
     RC=ISFCALLS("OFF")                         
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Sat Jul 14, 2012 3:48 am    Post subject:
Reply with quote

I am stuck in a stupid situation, When i execute the code directly using EX in front of member it works fine. The same code i run as a batch in JCL it gives a JOB not found error.

Am i missing anything ?
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Sat Jul 14, 2012 4:02 am    Post subject:
Reply with quote

solved .. Thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jul 14, 2012 9:07 am    Post subject: Reply to: fetching Job details from spool using a jobname
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Can we use OPTIMIZE FOR 1 ROWS for fe... cvijay784 DB2 1 Fri Aug 05, 2016 11:56 am


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