View previous topic :: View next topic
|
Author |
Message |
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
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 |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Thank you all for your replies. |
|
Back to top |
|
|
|