AIX in KSDS VSAM.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

AIX in KSDS VSAM.

Post by Biden »

Hi,

I've a doubt about AIX record size: when we create AIX we give record size as Primary index + length of AIX + 5 bytes? What is purpose of these five bytes and what the info it will stores in it?

Thanks,
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: AIX in KSDS VSAM.

Post by Robert Sample »

The 5 bytes are system information -- IBM does not tell us what is stored in those bytes; therefore it can be categorically stated that there is no reason for you to know that. If you work for IBM, and get assigned to work on VSAM, then you can find out (but you might have to sign a non-disclosure agreement before you find out).

And your formula for the AIX record size is incomplete -- you gave the record size for a UNIQUE alternate index. Alternate indexes, unlike primary keys, can have duplicate values (up to 32767 of them) and hence the alternate index record size can be VASTLY greater than the base cluster record size.
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Re: AIX in KSDS VSAM.

Post by Biden »

Thanks Robert.

As you indicated about the formula, I look back and see that this might be correct: RECSZ= 5 + AIXKL + (n x BCKL). Where

AIXKL is the alternate-key length. (See the KEYS parameter.)
BCKL is the base cluster's prime-key length.
n=1 when the UNIQUEKEY parameter is specified.
n is equal to the number of base cluster records that have the same alternate index key when NONUNIQUEKEY is specified.

Is that correct, please suggest.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: AIX in KSDS VSAM.

Post by Robert Sample »

Yes. If your alternate key length is 27 bytes and your primary key length is 20 bytes and you expect up to 10,000 duplicates then 5 + 27 + 10000*20 gives 200032 as the alternate index record size.
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Re: AIX in KSDS VSAM.

Post by Biden »

Thanks Robert.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: AIX in KSDS VSAM.

Post by Robert Sample »

Update: after doing some research, I managed to find out what the 5 bytes are:
Byte
1 - ESDS/KSDS indicator (X'00' for ESDS, X'01' for KSDS)
2 - X'04' for ESDS (length of RBA) and length of primary key for KSDS
3-4 - Binary count of key occurrences if NONUNIQUEKEY (X'0001' to X'FFFF'), X'0001' if UNIQUEKEY
5 - Length of alternate index key
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Re: AIX in KSDS VSAM.

Post by Biden »

Excellent, Thanks for your time Robert. This is a great help.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”