View previous topic :: View next topic
|
Author |
Message |
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
Hi,
I need current date/system date to be a part of the dsn name in jcl as -
//DD1 DD DSN=file1.20140324.dat
Please assist. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
kishpra wrote: |
//DD1 DD DSN=file1.20140324.dat
|
Is your second DSN qualifier a valid one for a Mainframe DSN?
The rule says: Each qualifier must be 1-8 alphanumeric characters,the first alphabetic. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Have you looked if SET statement will be useful to you?.
Code: |
// SET DATE=D140324
//DD1 DD DSN=FILE1.&DATE..DAT,DISP=SHR
|
|
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
But I need a system date on daily basis as the file is created on a daily basis.
So I cant use a SET as I can't modify the jcl on daily basis. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
You can have the SET statement inside an INCLUDE member, and update the include member to current date in the same JCL using either REXX or SORT. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
Back to top |
|
|
hailashwin
New User
Joined: 16 Oct 2008 Posts: 74 Location: Boston
|
|
|
|
Could building a second job(Job B) with the required dataset name in the first job(Job A) and submit via INTRDR(submit Job B from Job A) be a possible solution?
Thanks,
Ashwin |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
What scheduler do you use? Most if not all of them will have the ability to generate the current date and substitute it in to the JCL at run time. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
There are many examples already available over internet and this forum, you may wants to just give a right search. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
Could building a second job(Job B) with the required dataset name in the first job(Job A) and submit via INTRDR(submit Job B from Job A) be a possible solution? |
Yes , Right. |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
Please help me with the example |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
|