MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VSAM Key information

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Oct 28, 2004 10:37 am    Post subject: VSAM Key information Reply with quote

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
View user's profile Send private message
rrv
Beginner


Joined: 01 Nov 2004
Posts: 19
Topics: 6

PostPosted: Thu Nov 11, 2004 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Nov 12, 2004 2:20 am    Post subject: Reply with quote

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
View user's profile Send private message
bablack
Beginner


Joined: 04 Dec 2002
Posts: 71
Topics: 0
Location: Little Falls, NJ

PostPosted: Thu Nov 18, 2004 3:07 pm    Post subject: Reply with quote

The VSAM macros SHOWCAT and SHOWCB may do what you need.
_________________
Bruce A. Black
Senior Software Developer
Innovation Data Processing
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Nov 19, 2004 4:32 am    Post subject: Reply with quote

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
View user's profile Send private message
bablack
Beginner


Joined: 04 Dec 2002
Posts: 71
Topics: 0
Location: Little Falls, NJ

PostPosted: Fri Nov 19, 2004 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Nov 23, 2004 11:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group