IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

fetching Job details from spool using a jobname


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 1788
Location: Bloomington, IL

PostPosted: Sat Jul 14, 2012 12:18 am
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

Moderator Emeritus


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

PostPosted: Sat Jul 14, 2012 12:58 am
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
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
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Sat Jul 14, 2012 9:07 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Search string in job at regular Spool... CLIST & REXX 0
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts JCL SORT to compress the student's de... DFSORT/ICETOOL 7
No new posts Splitting group records based on deta... DFSORT/ICETOOL 8
Search our Forums:

Back to Top