IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

current date in jcl file name


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Mon Mar 24, 2014 11:43 am
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Mar 24, 2014 12:15 pm
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Mar 24, 2014 12:22 pm
Reply with quote

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
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Mon Mar 24, 2014 12:33 pm
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Mar 24, 2014 12:55 pm
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Mar 24, 2014 12:58 pm
Reply with quote

Try the below link.. to get help with EZACFSM1.

ibmmainframeforum.com/viewtopic.php?f=16&t=5322
Back to top
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 74
Location: Boston

PostPosted: Mon Mar 24, 2014 5:11 pm
Reply with 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?

Thanks,
Ashwin
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Mon Mar 24, 2014 8:15 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2948
Location: NYC,USA

PostPosted: Tue Mar 25, 2014 6:28 am
Reply with quote

There are many examples already available over internet and this forum, you may wants to just give a right search.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2948
Location: NYC,USA

PostPosted: Tue Mar 25, 2014 6:31 am
Reply with quote

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
View user's profile Send private message
kishpra

New User


Joined: 24 May 2010
Posts: 92
Location: Pune

PostPosted: Tue Mar 25, 2014 10:19 am
Reply with quote

Please help me with the example
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2948
Location: NYC,USA

PostPosted: Tue Mar 25, 2014 11:41 am
Reply with quote

This would give you some examples,

ibmmainframes.com/about33161.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts Change history of vsam file. JCL & VSAM 3
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts EMPTY file check scenario JCL & VSAM 6
No new posts SORT deletes the SORTOUT file DFSORT/ICETOOL 8
Search our Forums:

Back to Top