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 

Does the Path actually contain data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Mon Feb 10, 2020 5:09 pm    Post subject: Does the Path actually contain data Reply with quote

Hi,
Strange to be posting a rather basic VSAM question but I have read the relevant section on VSAM Demystified and am still mystified.

When I define an AIX and define the PATH and do the BLDINDEX (we use KWIKKEY)- does the dataset that represents the PATH now contain all the data that's in the base cluster but in the order of the AIX?

I mean I can go to 3.4 and browse the dataset that represents the PATH.

I am confused because I saw a line on a website that said "Path name will have a catalog entry but path does not contain any records."

And also the fact that the very basis for the AIX and Path is to avoid having different "versions" of the VSAM dataset organised in different physical sequences. VSAM Demystified says " AIX eliminate the need to store the same data in different sequences in multiple clusters "

It also says " When a program opens a path for processing, both the base cluster and the alternate index are opened. "

So if that's the case then when I browse the Path am I really looking at the base cluster's data?
Is that why when I max to the bottom it says "Record numbers unknown"?

If I get more clarity on this, then I do have a follow-up question regarding how STARTBR and READ NEXT work in CICS...

Thanks
Back to top
View user's profile Send private message
Robert Sample
Beginner


Joined: 15 Dec 2009
Posts: 12
Topics: 0
Location: Atlanta

PostPosted: Mon Feb 10, 2020 6:00 pm    Post subject: Reply with quote

Quote:
does the dataset that represents the PATH now contain all the data that's in the base cluster but in the order of the AIX?
This is the first misconception -- the PATH is a CATALOG entry and does not represent an actual data set. The PATH relates the alternate index to the base cluster name. The PATH is how you use the AIX to get to the base cluster.

If you look at the catalog for a VSAM sphere, you will see 7 entries -- base cluster name, base cluster data component name, base cluster index component name, AIX name, AIX data component name, AIX index component name, and PATH name. Only the data and index components have sizes because they are the only ones that contain data -- the other three are only catalog entries. The AIX stores the AIX key and its associated primary keys but nothing else of the data in the base cluster is stored in the AIX -- if you see data other than keys, you are looking at the base cluster.
Back to top
View user's profile Send private message
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Tue Feb 11, 2020 8:48 am    Post subject: Reply with quote

Robert Sample wrote:
Quote:
does the dataset that represents the PATH now contain all the data that's in the base cluster but in the order of the AIX?
This is the first misconception -- the PATH is a CATALOG entry and does not represent an actual data set. The PATH relates the alternate index to the base cluster name. The PATH is how you use the AIX to get to the base cluster.

If you look at the catalog for a VSAM sphere, you will see 7 entries -- base cluster name, base cluster data component name, base cluster index component name, AIX name, AIX data component name, AIX index component name, and PATH name. Only the data and index components have sizes because they are the only ones that contain data -- the other three are only catalog entries. The AIX stores the AIX key and its associated primary keys but nothing else of the data in the base cluster is stored in the AIX -- if you see data other than keys, you are looking at the base cluster.


Thanks Robert. So when I browse the path, I'm seeing a view of the base cluster that has been resorted on the fly to reflect the AIX?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Tue Feb 11, 2020 8:49 am    Post subject: Reply with quote

sumithar,

Didn't you ask the same question before?

https://www.mvsforums.com/helpboards/viewtopic.php?t=12972
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Tue Feb 11, 2020 10:32 am    Post subject: Reply with quote

kolusu wrote:
sumithar,

Didn't you ask the same question before?

https://www.mvsforums.com/helpboards/viewtopic.php?t=12972


how thoroughly mortifying! thank you for being kind. and not only was it less than a year ago, I used pretty much the same words.
Back to top
View user's profile Send private message
Robert Sample
Beginner


Joined: 15 Dec 2009
Posts: 12
Topics: 0
Location: Atlanta

PostPosted: Tue Feb 11, 2020 10:35 am    Post subject: Reply with quote

Quote:
So when I browse the path, I'm seeing a view of the base cluster that has been resorted on the fly to reflect the AIX?
No, not at all. For each AIX, the record consists of some overhead bytes followed by the AIX key (which comes from the base cluster data set) followed by one (or more, if nonunique keys are allowed) primary key. If there can be multiple primary keys for the AIX, they are stored in the AIX record in the sequence that they were added in. So for the initial AIX build, the records will be in primary key sequence for each AIX key -- but if UPDATE is allowed and additional primary keys are added for the AIX key, they are stored at the end of the AIX record. Which means that, unless the data set is unloaded and rebuilt periodically, once updates start happening the order of primary keys presented when reading the AIX (PATH) will NOT be sorted.
Back to top
View user's profile Send private message
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Wed Feb 19, 2020 8:54 am    Post subject: Reply with quote

Robert Sample wrote:
Quote:
So when I browse the path, I'm seeing a view of the base cluster that has been resorted on the fly to reflect the AIX?
No, not at all. For each AIX, the record consists of some overhead bytes followed by the AIX key (which comes from the base cluster data set) followed by one (or more, if nonunique keys are allowed) primary key. If there can be multiple primary keys for the AIX, they are stored in the AIX record in the sequence that they were added in. So for the initial AIX build, the records will be in primary key sequence for each AIX key -- but if UPDATE is allowed and additional primary keys are added for the AIX key, they are stored at the end of the AIX record. Which means that, unless the data set is unloaded and rebuilt periodically, once updates start happening the order of primary keys presented when reading the AIX (PATH) will NOT be sorted.

Robert Sample wrote:
Quote:
So when I browse the path, I'm seeing a view of the base cluster that has been resorted on the fly to reflect the AIX?
No, not at all. For each AIX, the record consists of some overhead bytes followed by the AIX key (which comes from the base cluster data set) followed by one (or more, if nonunique keys are allowed) primary key. If there can be multiple primary keys for the AIX, they are stored in the AIX record in the sequence that they were added in. So for the initial AIX build, the records will be in primary key sequence for each AIX key -- but if UPDATE is allowed and additional primary keys are added for the AIX key, they are stored at the end of the AIX record. Which means that, unless the data set is unloaded and rebuilt periodically, once updates start happening the order of primary keys presented when reading the AIX (PATH) will NOT be sorted.


Hi Robert,
Thanks for your forbearance. I find that we do have jobs that rebuild the AIX on a nightly basis.
I guess what I meant to say was that when I do view/browse the path (using FileAid or VSAM utitlities or whatever) I get to see the entire records this time in the order of the AIX. But it's obviously because the AIX is being first read and the matching record retrieved from the base cluster.
Wonder how many it retrieves at one go!
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 -> Data Management 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