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: 86
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: 86
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: 1609
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: 1609
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: 86
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: 1609
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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