file queing

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

file queing

Postby Lightning Lad » Tue Feb 16, 2010 11:17 pm

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??
Lightning Lad
Posts: 5
Joined: Thu Jan 21, 2010 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: file queing

Postby MrSpock » Tue Feb 16, 2010 11:26 pm

Lightning Lad wrote:...any utility available??

The (IDCAMS) LISTCAT command is always available and is useable in many forms.
User avatar
Global moderator
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: file queing

Postby Robert Sample » Wed Feb 17, 2010 12:06 am

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.
Robert Sample
Global moderator
Posts: 3686
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 274 times

Return to IBM Cobol


  • Related topics
    Last post