Page 3 of 3

Re: Can anybody suggest me to impliment IDCAMS LISTCAT in CO

PostPosted: Sat Feb 04, 2012 4:39 am
by parthiban
I would you simple when you try the same in Rexx programming lang.

Use OUTTARP function to catch the output of the LISTCAT comamnd.

Re: Can anybody suggest me to impliment IDCAMS LISTCAT in CO

PostPosted: Sat Feb 04, 2012 9:06 am
by skankatala
BillyBoyo wrote:Run the Listcat. "Parse" the output (rexx, sort, something) to give a list of datasets to the Cobol program.

Do all the "dynamic" stuff to open, read, close in the Cobol program. Produce two output datasets, one being a list of files which have at least one of your matching keys on (no need to read everything) the other a list of those with no match (which will have been read in their entirety, assuming you don't have any "keyed" files). List 1 plus List 2 should match the input list. This should be programmatically confirmed.

Feed the list 1 into your standard backup utility, having added necessary control information. Feed list 2 into a "whatever you want to do with those" utility, again having had control information added. Rexx, sort, something for the control cards.

Keep it as simple as possible. If you are going to be reading hundreds of files (or n generations of hundreds of files) you are going to need to check everything, and that means "automation". Do not try to jam everything into the Cobol program. It would be an idiotic thing to do. If you have a client/boss who insists, I'll write a little note that you can pass on to them with my best wishes.

You will already have covered file sizings, yes? Do some "time trials" with a quick-and-dirty program. You might have to break it up into logical pieces to get it running in a manageable amount of time, depending on how much data/how many files.


Hello Billy...

As you said, I submitted a job for LISTCAT through cobol and did remaining with COBOL functionality...

Re: Can anybody suggest me to impliment IDCAMS LISTCAT in CO

PostPosted: Sat Feb 04, 2012 9:10 am
by skankatala
parthiban wrote:I would you simple when you try the same in Rexx programming lang.

Use OUTTARP function to catch the output of the LISTCAT comamnd.


Hello Parthiban...

Thank you for your reply. I am not familiar with REXX. So I am going with COBOL