Can anybody suggest me to impliment IDCAMS LISTCAT in COBOL?



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

Can anybody suggest me to impliment IDCAMS LISTCAT in COBOL?

Postby skankatala » Mon Jan 30, 2012 7:56 pm

How to impliment IDCAMS utility option LISTCAT command using COBOL?
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Mon Jan 30, 2012 8:08 pm

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!
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby steve-myers » Mon Jan 30, 2012 8:37 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

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

Postby skankatala » Mon Jan 30, 2012 10:06 pm

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.
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Mon Jan 30, 2012 10:10 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

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

Postby skankatala » Mon Jan 30, 2012 10:16 pm

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?
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Mon Jan 30, 2012 10:26 pm

Run the LISTCAT with the output going to a dataset.

Read the dataset in the Cobol program.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby skankatala » Mon Jan 30, 2012 10:33 pm

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?
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Mon Jan 30, 2012 10:42 pm

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?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby skankatala » Mon Jan 30, 2012 10:50 pm

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.
skankatala
 
Posts: 42
Joined: Sun Dec 11, 2011 9:45 am
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post