Page 1 of 3

Can anybody suggest me to impliment IDCAMS LISTCAT in COBOL?

PostPosted: Mon Jan 30, 2012 7:56 pm
by skankatala
How to impliment IDCAMS utility option LISTCAT command using COBOL?

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

PostPosted: Mon Jan 30, 2012 8:08 pm
by Akatsukami
A rather foolish notion; you should use Rexx for that. However, as you are unlikely to be up to doing so:
  1. Establish a TSO environment, either by actually running under TSO (IKJEFTxx) or calling IKJTSOEV
  2. Execute the LISTCAT command via IKJEFTSR (a/k/a TSOLNK)
  3. Hi, Opal!

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

PostPosted: Mon Jan 30, 2012 8:37 pm
by steve-myers
First of all, I'm not a Cobol person. Second, I'm inclined to agree with Akatsukami. Third, this is not likely to be something a "beginner" would want to try. Fourth, I'd read up on IGGCSI00, though I'm not so sure if this would be appropriate. Fifth, what are you really trying to do??? What do you really want to do with this output??? There may be simpler methods to accomplish what you really want to do.

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

PostPosted: Mon Jan 30, 2012 10:06 pm
by skankatala
steve-myers wrote:First of all, I'm not a Cobol person. Second, I'm inclined to agree with Akatsukami. Third, this is not likely to be something a "beginner" would want to try. Fourth, I'd read up on IGGCSI00, though I'm not so sure if this would be appropriate. Fifth, what are you really trying to do??? What do you really want to do with this output??? There may be simpler methods to accomplish what you really want to do.


Hi Steve, thanks for your response. Using LISTCAT, i will list out the details of all the Generations of GDG. Then, I would like to pull datasets generated on a particular date using COBOL. I can do it with JCL, but my requirement should be fulfilled with COBOL.

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

PostPosted: Mon Jan 30, 2012 10:10 pm
by enrico-sorichetti
why COBOL when there are examples available doing it wit <sort>

anyway the best thing would be to run a LISTCAT and process the output... not invoke IDCAMS thru COBOL

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

PostPosted: Mon Jan 30, 2012 10:16 pm
by skankatala
enrico-sorichetti wrote:why COBOL when there are examples available doing it wit <sort>

anyway the best thing would be to run a LISTCAT and process the output... not invoke IDCAMS thru COBOL


Can we find Creation date of a Dataset using COBOL?

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

PostPosted: Mon Jan 30, 2012 10:26 pm
by BillyBoyo
Run the LISTCAT with the output going to a dataset.

Read the dataset in the Cobol program.

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

PostPosted: Mon Jan 30, 2012 10:33 pm
by skankatala
BillyBoyo wrote:Run the LISTCAT with the output going to a dataset.

Read the dataset in the Cobol program.


Is there any chance to write the LISTCAT logic in cobol without JCL?

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

PostPosted: Mon Jan 30, 2012 10:42 pm
by Akatsukami
skankatala wrote:
BillyBoyo wrote:Run the LISTCAT with the output going to a dataset.

Read the dataset in the Cobol program.


Is there any chance to write the LISTCAT logic in cobol without JCL?

I just told you how, mushi. Besides, since you don't know COBOL, how do you expect to write this?

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

PostPosted: Mon Jan 30, 2012 10:50 pm
by skankatala
Akatsukami wrote:
skankatala wrote:
BillyBoyo wrote:Run the LISTCAT with the output going to a dataset.

Read the dataset in the Cobol program.


Is there any chance to write the LISTCAT logic in cobol without JCL?

I just told you how, mushi. Besides, since you don't know COBOL, how do you expect to write this?


I don't know COBOL. But, I can learn COBOL while i wrte program.
I am following your answer, it seems confusing while writing. That is why I am looking for alternatives. If I didn't find anything, definitely I will go with your suggestions.