View previous topic :: View next topic
|
Author |
Message |
deb_parthas
New User
Joined: 24 Nov 2005 Posts: 18
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Do You really think that double posting will get You more answers ??
the other post will be deleted |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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
www.ibmmainframes.com/viewtopic.php?t=25664
hth |
|
Back to top |
|
|
|