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: 91
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: 91
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: 179
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: 1742
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: 1742
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: 91
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: 1742
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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