How do I put a date onto the file name?
Moderators: Frank Yaeger, DikDude, Moderator Group
How do I put a date onto the file name?
In my JCL, when I am creating an output file, I need to use the system date as part of the output file name, so that the file name looks something like this:
MY.FILE.082309
How do I take the system date and make it part of my output file name?
MY.FILE.082309
How do I take the system date and make it part of my output file name?
First of all, that's an invalid dataset name.
Second, don't forget that JCL is not a programming language. Stuff like date and time are completely foreign to it.
Third, where's the job going to get the date value from? A program? A JCL SET statement? A scheduler variable? Does the value for the date need to be referred to in multiple locations throughout the job?
Personally, I recommend creating and cataloging the dataset with a date or time value from within a program.
Second, don't forget that JCL is not a programming language. Stuff like date and time are completely foreign to it.
Third, where's the job going to get the date value from? A program? A JCL SET statement? A scheduler variable? Does the value for the date need to be referred to in multiple locations throughout the job?
Personally, I recommend creating and cataloging the dataset with a date or time value from within a program.
Well....,
I was able to create a data set with a name of output.file.090817.142339, so I don't see how the example I mentioned in my original post was an invalid dataset name. Second, the date was extracted from the mainframe's date and time internals, so stuff like date and time are not completely foreign to it.. Thirdly, the same comment applies - the date and time were extracted from mainframe internals. No language use was involved, except in creating the data contained in my date and time stamped data file.
I suggest you might try doing an Internet search concerning adding a date or time to the name of a mainframe output dataset.
I was able to create a data set with a name of output.file.090817.142339, so I don't see how the example I mentioned in my original post was an invalid dataset name. Second, the date was extracted from the mainframe's date and time internals, so stuff like date and time are not completely foreign to it.. Thirdly, the same comment applies - the date and time were extracted from mainframe internals. No language use was involved, except in creating the data contained in my date and time stamped data file.
I suggest you might try doing an Internet search concerning adding a date or time to the name of a mainframe output dataset.
-
- Member
- Posts: 16
- Joined: Thu Jul 30, 2009 7:52 am
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
I will use the method of using system values placed into my JCL. Look at the informaiton in this link:MrSpock wrote:Well then, getting back to the original topic. What method will you use to provide the values for date and/or time to the job? Or are you going to do this from inside a program instead?
[color=red]***deleted by admin******[/ ... 7874.html
Hi dbdinc,
Links to other forums are not allowed here.
If you already got the answer .. post the results/answer here.
Thanks.
Admin,
www.mainframegurukul.com
Links to other forums are not allowed here.
If you already got the answer .. post the results/answer here.
Thanks.
Admin,
www.mainframegurukul.com
I wasn't aware of that; it's unfortunate, because sometimes the answer to a question might be in another forum but not in this forum. I am not belittling this forum - I just thought that the Internet was a place for knowledge sharing, not knowledge limiting.Krishna wrote:Hi dbdinc,
Links to other forums are not allowed here.
If you already got the answer .. post the results/answer here.
Thanks.
Admin,
www.mainframegurukul.com
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page