Page 1 of 1

file queing

PostPosted: Tue Feb 16, 2010 11:17 pm
by Lightning Lad
In my one of the requirement, i am getting files from a third party daily.
If in any case my batch abends on say day one, then the processing for that particluar file does not occur.
Suppose the batch is not corrected even after 2 days, still i ll be getting one file per day.
When my batch runs on the third day, my requirement says that i have to process the files in FIFO, that is the file which i recieved on day 1(day the batch abended) first and then so on.
These files are present in GDG bases.So how do i handle it in my program.. any utility available??

Re: file queing

PostPosted: Tue Feb 16, 2010 11:26 pm
by MrSpock
Lightning Lad wrote:...any utility available??


The (IDCAMS) LISTCAT command is always available and is useable in many forms.

Re: file queing

PostPosted: Wed Feb 17, 2010 12:06 am
by Robert Sample
These files are present in GDG bases
Terminology note: either they are generations of a GDG or they are not. They cannot be "present in GDG bases" since GDG bases are not files -- they are catalog data about the GDG (such as number of generations to keep cataloged).

If you have to maintain each day's data as a separate file, you need to ensure your JCL has the relative generation number as a parameter so you can run the job in catch-up mode against the -n, ..., -2, -1, 0 generations.

Other options, if you don't have to keep each day's data separated:
(1) if there is a date in the data, use the GDG base as input to a sort on the date; that'll get all the data into sequence -- as long as the date represents the day to be processed
(2) run a daily job, that appends the current day's data to a sequential file and use the sequential file for input to your program. Clear the sequential file after a successful run of your program.