Hi,
In my JCL I am reading a GDG which is generated on a daily basis. I have a requirement that on Monday I have to read the GDG which was generated on Friday.
For Example,
A.B.C.G1693V001 >> Created on Monday
A.B.C.G1694V001 >> " " Tuesday
A.B.C.G1695V001 >> " " Wednesday
A.B.C.G1696V001 >> " " Thursday
A.B.C.G1697V001 >> " " Friday
A.B.C.G1698V001 >> " " Saturday
A.B.C.G1699V001 >> " " Sunday
A.B.C.G1700V001 >> " " Monday
.
.
.
Now on Monday I have to read the GDG which is created on Friday i.e. A.B.C.G1697V001. Can we do this using only the JCL?
Thanks in advance.
Reading a GDG File
Moderators: Frank Yaeger, DikDude, Moderator Group
First of all none of those are valid dataset names as the last portion - the generation number - is 9 byts in length when a generation number can only be 8 bytes in length and no node of a dataset name can exceed 8 bytes.
So, assuming that the '1' at the end of each datatname should not be there - what have you tried and what problems are you having? You HAVE heard of relative generations haven't you and you DO KNOW how to code them - (0) (-1) (-2) etc?
Assuming your job is ALWAYS running after the Monday gds is created then Monday's is (0). Work it out form there.
By the way - you cannot read a file using JCL, your program will read the file and you tell it which file to read by means of the CL.
So, assuming that the '1' at the end of each datatname should not be there - what have you tried and what problems are you having? You HAVE heard of relative generations haven't you and you DO KNOW how to code them - (0) (-1) (-2) etc?
Assuming your job is ALWAYS running after the Monday gds is created then Monday's is (0). Work it out form there.
By the way - you cannot read a file using JCL, your program will read the file and you tell it which file to read by means of the CL.
Last edited by NicC on Fri May 18, 2012 7:08 pm, edited 1 time in total.
Regards
Nic
Nic
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
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