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 get the JOBID through REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
kirankumargupt
Beginner


Joined: 23 Feb 2006
Posts: 5
Topics: 4

PostPosted: Tue Aug 22, 2006 2:26 am    Post subject: How to get the JOBID through REXX Reply with quote

Dear All,

I have to get the JOBID of the job which I am executing to using REXX macro.

For eg. STATUS will give all the jobs with jobname as USERID plus one character. But I need to get the jobid even if the jobname doent start with my USERID.

x=outtrap('junk.')
'status'
x=outtrap(off)
a=junk.0
jobid1=junk.a

In jobid1 I am getting JOBID of the job which executes this macro provided jobname is starting with my userid.

Hope anyone can help me.

Regards,
Nishanth
Back to top
View user's profile Send private message Send e-mail
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Aug 22, 2006 4:59 am    Post subject: Reply with quote

Trap the output of SUBMIT and parse the line to get the JOBID.

O.
________
vaporite solo vaporizer


Last edited by ofer71 on Sat Feb 05, 2011 11:42 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Tue Aug 22, 2006 7:50 am    Post subject: Reply with quote

Try this:
Code:

cvt = storage(10,4) /* FLCCVT-PSA data area */ 
tcbp = storage(d2x(c2d(cvt)),4) /* CVTTCBP */   
tcb = storage(d2x(c2d(tcbp)+4),4)               
tiot = storage(d2x(c2d(tcb)+12),4) /* TCBTIO */
jobname = strip(storage(d2x(c2d(tiot)),8))     
say jobname
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Aug 22, 2006 9:09 am    Post subject: Reply with quote

That will return the name of the job that the REXX was invoking from. The original poster was looking for the jobid of a job invoked from within REXX.

O.
________
health shop
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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