Lizette, Check out this smart DFSORT trick "Copy GDG records in first in, first out order" here
http://www.ibm.com/support/docview.wss?uid=isg3T7000094 In step S2 you need to use the following control cards to just limit the oldest GDG generation //SYSIN DD * OPTION COPY,STOPAFT=1 INCLUDE COND=(4,7,CH,EQ,C'NONVSAM') INREC BUILD=(C'//SYSUT1 DD DISP=SHR,DSN=',17,44,80:X) //* Further if you have any questions please let me know There are couple of other GDG related tricks listed in there which might be of use Thanks, Kolusu DFSORT Development IBM Corporation From: Lizette Koehler <[email protected]> To: [email protected] Date: 11/17/2015 03:06 AM Subject: Fastest way to read OLDEST GDG entry Sent by: IBM Mainframe Discussion List <[email protected]> I have a request to read the oldest GDG to process. But CSI is slow sometimes and better other times. So here is the basic request File lands as a GDG often The process needs to read the oldest GDG and then delete it. GDGs must be read in correct order for time/date processing I tried GDGORDER on the JCL for z/OS V2.1 and it works great on the Base. But using //DDSTMT DD DISP=SHR,DSN=GDDG(0),GDGORDER=FIFO does not seem to work. Is there another process that could be used to identify the OLDEST GDG for Input and then delete that GDG? Or is there another way to handle this situation? I was going to see if the LISTC could be faster than CSI. The process should be native to z/OS and not a vendor product. Or shareware/freeware is okay. Thanks Lizette Koehler ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
