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
 

 

Obtaining Job ID dynamically..

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

New User


Joined: 24 Nov 2005
Posts: 18

PostPosted: Fri Sep 26, 2008 12:35 pm    Post subject: Obtaining Job ID dynamically..
Reply with quote

Hi Friends,
Could you advise if we can obtain a Job ID dynamically when a job is submitted. We have a situation wherein a file needs to be created within the same job with name as A.B.<JOBID>.

Thanks for your help..

Partha
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Sep 26, 2008 12:38 pm    Post subject: Reply to: Obtaining Job ID dynamically..
Reply with quote

Do You really think that double posting will get You more answers ??

the other post will be deleted
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 26, 2008 1:21 pm    Post subject:
Reply with quote

I am not sure of JCL, but you can do it with a program.

Do you want to do it ONLY with JCl?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Sep 26, 2008 1:49 pm    Post subject: Reply to: Obtaining Job ID dynamically..
Reply with quote

This topic contains a link to a site that shows how to retrieve the running jobid in a COBOL program.

This topic shows how to retrieve the running jobid in a REXX program.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Sep 26, 2008 3:30 pm    Post subject:
Reply with quote

Well, I see the link to the Rexx program points to the cobol program and I cannot find the link to a rexx program wich retrieve the jobid in the Rexx forum, I've found how to get the jobid of a JOB submitted by a Rexx program.

Well, the code to get the Jobid of the job in which the rexx program is running is this:
Code:
numeric digits 10                             
                                             
tcb     = storage(21C,4)                     
JSCB    = storage(d2x(c2d(tcb)+180),4)       
ssib    = storage(d2x(c2d(JSCB)+316),4)       
ssibjnum= strip(storage(d2x(c2d(ssib)+12),8))
say 'ssibjnum:' ssibjnum                     
exit                                         



if you need the jobid of a job submitted by a rexx program you can read this topic
http://www.ibmmainframes.com/viewtopic.php?t=25664

hth
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 Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts PL/I: opening file w/ dynamically det... Sam Dodgers PL/I & Assembler 6 Wed Jul 27, 2016 4:05 pm
No new posts Changing UID dynamically in ACF2 newroad CA Products 2 Sat Oct 31, 2015 1:17 am
No new posts Pass data from panel to rexx dynamically tvinodkumar7 TSO/ISPF 8 Tue Jul 21, 2015 5:24 pm


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