One way of doing is by having the processing job to the following: 1) Add a step to backup all gens of the FTP GDG //backup exec pgm=Iebgener //sysut1 dd dsn=FTP.FILES,disp=shr <==== Backup all gens //sysut2 dd dsn-FTP.FILES.BACKUP, disp=............etc.......
2) In the step that process the FTP GDG file have it process all Gens //backup exec pgm=apppgm //input dd dsn=FTP.FILES,disp=(old,delete,keep) <==== Process all gens //...................etc.... Based on the assumption that only 1 file per day is FTPd - Monday's job would process 3 gens of the files Tuesday - Friday jobs would only process only 1 gen of the file -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu]on Behalf Of frederick.verw...@hrsdc-rhdsc.gc.ca Sent: Wednesday, January 28, 2009 6:46 AM To: IBM-MAIN@bama.ua.edu Subject: Re: New GDG question Hello, This might run into trouble if you need to open lots of datasets due to holidays. Suppose, your program always defines the last 3 datasets (0), (-1) and (-2) with the corresponding DD statements in your JCL. However, you'll have some program logic to determine what day of the week it is. On Tuesday to Friday, only open and read the last dataset. On Monday, open and read all three. This would take a level of 'abstracting' between your processing and the datasets so you wouldn't need multiple ways to process data from different datasets. I'm assuming your logic would be the same for each dataset. Than again, somebody might be able to dream up some conditional JCL for running an IEBGENER to concatenate the 3 datasets into one temporary dataset on Monday's and just copy the current one to a temporary dataset on Tuesday to Friday. Nice Day, Eric Verwijs -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Frank Swarbrick Sent: 2009-01-27 8:04 PM To: IBM-MAIN@bama.ua.edu Subject: New GDG question Consider the following... A file is received (via FTP) 7 days a week from somewhere. The FTP writes to generation +1. Problem: The program that uses the file(s) runs only every business day. On a regular Tuesday-Friday it needs to only read the most recent generation (0). But on Monday it needs to read (0), (-1) and (-2). And of course there are holidays to consider. Thoughts on how this can be addressed? Thanks, Frank ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html