View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Oct 28, 2004 10:37 am Post subject: VSAM Key information |
|
|
Given the DDname, I can find the DSNAME & DCB parameters for the given dataset from JFCB control block. But if the input file is a VSAM/IAM file where should I look into to find the Key information (Offset & Length) ?
Thanks,
Phantom |
|
Back to top |
|
|
rrv Beginner
Joined: 01 Nov 2004 Posts: 19 Topics: 6
|
Posted: Thu Nov 11, 2004 2:51 pm Post subject: |
|
|
If File-Aid and/or IAM file dialog is installed at your site, you could look up the KEY information in either of these applications. Otherwise, you need to refer to the KEYS parameters specified when the cluster was originally defined (using DEFINE CLUSTER).
Do let me know if that answers your query.
rrv |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Nov 12, 2004 2:20 am Post subject: |
|
|
rrv,
Thanks for your reply. Actually I was looking for a System Level Solution. I need to access the VSAM Key information (given the DDNAME) from a COBOL program. I parse the JFCB control block to get the Dataset Name. From this point I think I have two ways to get the Key information of a VSAM dataset.
1. Parse the DCB control block within DEB control block. (The link that Kolusu gave me on my query "DCB Of DEB VS DCB of JFCB" think has the key information I'm looking for). I didn't try this yet.
2. Access the key information from VTOC using CVAFDIF macro or OBTAIN/CAMLST macros. Didn't get a chance to try this yet.
If someone has a alternative solution kindly let me know. It would be really helpful,
Thanks,
Phantom |
|
Back to top |
|
|
bablack Beginner
Joined: 04 Dec 2002 Posts: 71 Topics: 0 Location: Little Falls, NJ
|
Posted: Thu Nov 18, 2004 3:07 pm Post subject: |
|
|
The VSAM macros SHOWCAT and SHOWCB may do what you need. _________________ Bruce A. Black
Senior Software Developer
Innovation Data Processing |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Nov 19, 2004 4:32 am Post subject: |
|
|
Thanks a lot Bruce.
I just downloaded few manuals regarding SHOWCAT & SHOWCB. When I was looking at the SHOWCB manual, I found that LRECL, KEY information etc.. would be loaded into the memory only when the VSAM file is opened.
Bruce, let me give u a brief outlook of what I'm trying to do. I'm writing a tool which could accept any type of file (of any LRECL) as input and process them. The main requirement of this tool is SPEED (Should consume very low CPU Time) to process very huge input files. (Only very huge files).
This being the case, I read somewhere (in this forums) that OPEN itself is a costly operation especially for huge datasets. I was trying to OPEN a flat dataset using ASSEMBLER and read the DCB information. I could see a difference b/w the CPU Time b/w small dataset & huge datasets.
Also, someone suggested me that CVAFDIR macro will get the information from VTOC without opening the dataset. And I read in some other site that VSAM does not update the LRECL in VTOC, i.e if the LRECL of VSAM is changed after creation, it doesnot get updated in VTOC. Is that true ? I'm a bit confused.
Could you please suggest a good solution for me. (Also considering cpu time to get the required info. RECFM, LRECL, KEY LEN, KEY OFFSET) of any dataset (Not only for VSAM).
Is there a other way to use ONE command to get information for VSAM as well as PS/PO datasets ? If not its okay to use different commands.
It would be really helpful if you could provide me a short code.
Thanks a ton in advance for your help,
Phantom |
|
Back to top |
|
|
bablack Beginner
Joined: 04 Dec 2002 Posts: 71 Topics: 0 Location: Little Falls, NJ
|
Posted: Fri Nov 19, 2004 9:46 am Post subject: |
|
|
This could be tricky.
First, the overhead of OPEN is not particularly dependant on the size of the dataset. If the ds is in multiple extents or on multiple volumes, there may be some additional overhead but I don't expect it to be excessive. So unless you plan to OPEN many files in a single step, it would not worry about OPEN overhead. After all, you are eventually going to need to open the input file to read it.
Of course, you do need to know if it is VSAM (ACB) or non-VSAM (DCB).
You might look at the catalog search interface (IGGCSI00) documented in the "managing catalogs" manual. It will allow you to determine a lot of dataset characteristics from the catalog for both types of ds. But the LRECL , etc. for non-VSAM is not in the catalog, only in the DSCB, so I am not sure if IGGCSI00 returns that. Check the doc.
SHOWCAT for VSAM does return a lot of the cluster info without opening the dataset.
So, you will need separate processing for VSAM and non-VSAM
Good luck _________________ Bruce A. Black
Senior Software Developer
Innovation Data Processing |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Nov 23, 2004 11:01 pm Post subject: |
|
|
Bruce,
My apologies for not responding sooner. Thanks a lot for your suggestions. I just downloaded the "Managing Catalogs" Manual. I will read it and get back to you.
Thanks,
Phantom |
|
Back to top |
|
|
|
|