| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| kirankumargupt Beginner
 
 
 Joined: 23 Feb 2006
 Posts: 5
 Topics: 4
 
 
 | 
			
				|  Posted: Tue Aug 22, 2006 2:26 am    Post subject: How to get the JOBID through REXX |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| ofer71 Intermediate
 
 
 Joined: 12 Feb 2003
 Posts: 358
 Topics: 4
 Location: Israel
 
 | 
			
				|  Posted: Tue Aug 22, 2006 4:59 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Bithead Advanced
 
  
 Joined: 03 Jan 2003
 Posts: 550
 Topics: 23
 Location: Michigan, USA
 
 | 
			
				|  Posted: Tue Aug 22, 2006 7:50 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| ofer71 Intermediate
 
 
 Joined: 12 Feb 2003
 Posts: 358
 Topics: 4
 Location: Israel
 
 | 
			
				|  Posted: Tue Aug 22, 2006 9:09 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |