View previous topic :: View next topic
|
Author |
Message |
sinusam
New User
Joined: 06 Jan 2004 Posts: 18
|
|
|
|
Hello All,
Subject:-
I need to retrieve information on any VSAM file in my COBOL Program.
Description:-
In a COBOL program, I need the following information, when a filename is given.
Type ( KSDS / ESDS / RRDS / LDS )
Key Length
Key Start Position
Record Length
Control Interval Size
etc....
In TSO, we have LISTC or IDCAMs utility for this.
or we can use FileAid to get these type of information.
My problem is, I need those values in COBOL WORKING STORAGE variables.
I am declaring (i mean the FD entries and SELECT Clause) the file Dynamically. I got all these information about ESDS files from the MVS Control Blocks. But I failed for KSDS and RRDS.
Can I call IDCAMs or LISTC from COBOL and produce these results in working storage ?
or
Is there any other method / utility for this ?
or
Can I access VSAM Catalogue files (MASTER CATALOGUE, USER CATALOGUE) for this ?
or
If you have any information of the physical representation of VSAM Catalogue files, please inform
You can reply to this post, if you haven't done this before too. You may share any of your suggestions or ideas in this regard.
If I should rephrase this post , please PM.
Thanks in Advance..
Sinu Sam,
Trivandrum |
|
Back to top |
|
|
rajusnair
New User
Joined: 12 Apr 2005 Posts: 1
|
|
|
|
Dear Sinu,
Pl try calling IDCAMS from COBOL and Pl. let me know if you have any problems
regards
Raju |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
Back to top |
|
|
sinusam
New User
Joined: 06 Jan 2004 Posts: 18
|
|
|
|
Dear Raju and Somu,
Thanks for your Quick reply. Let me investigate on this.
C u soon.
regards,
Sinu |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You can definitely call IDCAMS, as well as TSO commands, REXX exec's, CLIST's, ISPF dialogs, and I'd be willing to bet that FileAid has programming API's that you can call. |
|
Back to top |
|
|
sinusam
New User
Joined: 06 Jan 2004 Posts: 18
|
|
|
|
Hi all,
I was able to call IDCAMS from a COBOL program, as described in the PDF File (from naspa.com). Initially I got S0C4 Abend, because I missed DATA(24) Compiler Option. Later I succeeded and was able to store the output in a file specified in SYSPRINT. That PDF file explains the method in detail.
I tried to execute a TSO Command as superk informed. I searched the net and got details of IKJEFTSR utility (TSO Service Routine). But I got error code 20 (which tells, u should run program in a TSO/E environment). Do you have any other method for this? I've posted it as a new topic in http://ibmmainframes.com/post-7843.html&highlight=#7843.
Thank you very much for all your effort.
Regards,
Sinu |
|
Back to top |
|
|
suny_sn1
New User
Joined: 26 Jun 2007 Posts: 6 Location: India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Suny and welcome to the forums,
Please do not reply to topics that are very old with no recent activity. The topic you replied to last last received a repy over 2 years ago. That is probably why the link no linger works.
Please start a new topic for your question. |
|
Back to top |
|
|
|