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
 

 

current date in jcl file name

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

New User


Joined: 24 May 2010
Posts: 87
Location: Pune

PostPosted: Mon Mar 24, 2014 11:43 am    Post subject: current date in jcl file name
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    Post subject: Re: current date in jcl file name
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    Post subject:
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: 87
Location: Pune

PostPosted: Mon Mar 24, 2014 12:33 pm    Post subject: Reply to: current date in jcl file name
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    Post subject:
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    Post subject:
Reply with quote

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

http://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: 73
Location: Boston

PostPosted: Mon Mar 24, 2014 5:11 pm    Post subject:
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: 175
Location: UK

PostPosted: Mon Mar 24, 2014 8:15 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1638
Location: NY,USA

PostPosted: Tue Mar 25, 2014 6:28 am    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1638
Location: NY,USA

PostPosted: Tue Mar 25, 2014 6:31 am    Post subject:
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: 87
Location: Pune

PostPosted: Tue Mar 25, 2014 10:19 am    Post subject: Reply to: current date in jcl file name
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 1638
Location: NY,USA

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

This would give you some examples,

http://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    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 Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm


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