Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Pass Date in the DSN as MMMDD ina JCL

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

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Dec 03, 2014 12:57 am    Post subject: Pass Date in the DSN as MMMDD ina JCL
Reply with quote

Hi ,

i want to pass the current date in the format MMMDD as a LLQ in a JCL . How can i do that ?

This input file is being passed from another system . My jcl uses this file and does a SORT on this file.

//JS025R EXEC PGM=SORT
//SYSOUT DD SYSOUT=X
//SYSPRINT DD SYSOUT=X
//SYSUDUMP DD SYSOUT=X
//SORTIN DD DSN=INPUT.SEQFILE.<<DEC02>>,
// DISP=SHR,DCB=BUFNO=35
//SORTOUT DD DSN=OUTPUT.FILE,
// DISP=(,CATLG,DELETE),
//SYSIN DD *

everytime i run this jcl , i am going and changing it manually . .

Can you help on how this can be automated ?
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 585
Location: The Universe

PostPosted: Wed Dec 03, 2014 6:07 am    Post subject:
Reply with quote

The first problem with this idea is something like 1202 is not a valid index element in a data set name. It must be something like D1202.

The second problem is it is entirely unnecessary. This is why generation data groups were invented nearly 50 years ago. I strongly recommend reading Appendix A. Generation Data Sets in "MVS JCL User's Guide" for your z/OS release.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8188
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 03, 2014 6:30 am    Post subject:
Reply with quote

If you want the LLQ to be something like DEC14, you probably can use your site's job scheduler to do so. If you don't want to use the job scheduler, plan on writing a program in the language of your choice to generate the JCL, then submit the generated JCL via the internal reader. JCL doesn't really support many features and date manipulation is NOT one of the supported features.
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 182
Location: UK

PostPosted: Wed Dec 03, 2014 1:14 pm    Post subject:
Reply with quote

As Robert has said, using your scheduler to generate the date is the way to go on this, although whether a month format of MMM is supported out of the box may be another matter.

In TWS for example, the nearest you could get would be &CMM&CDD but that would give you a date such as 1203 not DEC03. Perhaps you could get the name of the source file changed?

Failing that (again, using TWS as an example) you would have to set up a JCL variable table that maps 01 to JAN, 02 to FEB, etc.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Dec 03, 2014 10:10 pm    Post subject:
Reply with quote

Thank you all for your replies.
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 Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us