Page 1 of 4

How to EXTEND VSAM alternate index?

PostPosted: Mon Dec 14, 2009 11:02 am
by archiegaw
Need hel; with how to extend alternate index of a file.
Sample file below

FILE.VSAM
FILE.VSAM.AIX1
FILE.VSAM.AIX1.DATA
FILE.VSAM.AIX1.INDEX
FILE.VSAM.AIX2
FILE.VSAM.AIX2.DATA
FILE.VSAM.AIX2.INDEX
FILE.VSAM.AIX3
FILE.VSAM.AIX3.DATA
FILE.VSAM.AIX3.INDEX
FILE.VSAM.DATA
FILE.VSAM.INDEX
FILE.VSAM.PATH1
FILE.VSAM.PATH2
FILE.VSAM.PATH3

User is enclountering problem , as one of the index (index2) is related to a lot of codes
user was able to update same field for 10 times then failed after that. it is found that this code is linked to 99 other codes via alternaqte index. buit the codes linked are more than 100 , how to i go about extending the alternate index 2?
really appreciate the help

thanks.

Re: How to EXTEND VSAM alternate index?

PostPosted: Mon Dec 14, 2009 3:42 pm
by expat
Sit back and think about how much information we would need to try to help you, and compare that against the information actually given.

1) Error codes and messages encountered
2) File definitions for the base and AIX

Re: How to EXTEND VSAM alternate index?

PostPosted: Mon Dec 14, 2009 4:45 pm
by archiegaw
Hi,

Here are the added information for the VSAM files


PAPRPR.KSCI1DU.PF00610
PAPRPR.KSCI1DU.PF00610.AIX1
PAPRPR.KSCI1DU.PF00610.AIX1.DATA
PAPRPR.KSCI1DU.PF00610.AIX1.INDEX
PAPRPR.KSCI1DU.PF00610.AIX2
PAPRPR.KSCI1DU.PF00610.AIX2.DATA
PAPRPR.KSCI1DU.PF00610.AIX2.INDEX
PAPRPR.KSCI1DU.PF00610.AIX3
PAPRPR.KSCI1DU.PF00610.AIX3.DATA
PAPRPR.KSCI1DU.PF00610.AIX3.INDEX
PAPRPR.KSCI1DU.PF00610.DATA
PAPRPR.KSCI1DU.PF00610.INDEX
PAPRPR.KSCI1DU.PF00610.PATH1
PAPRPR.KSCI1DU.PF00610.PATH2
PAPRPR.KSCI1DU.PF00610.PATH3

==

Here's the listcat for
PAPRPR.KSCI1DU.PF00610.AIX2

********************************* Top of Data *****************
AIX ----------- PAPRPR.KSCI1DU.PF00610.AIX2
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
SMS MANAGED--------(YES)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----PAPRPR.KSCI1DU.PF00610.AIX2.DATA
INDEX----PAPRPR.KSCI1DU.PF00610.AIX2.INDEX
CLUSTER--PAPRPR.KSCI1DU.PF00610
PATH-----PAPRPR.KSCI1DU.PF00610.PATH2
ATTRIBUTES
UPGRADE
DATA ------- PAPRPR.KSCI1DU.PF00610.AIX2.DATA
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
AIX------PAPRPR.KSCI1DU.PF00610.AIX2
ATTRIBUTES
KEYLEN-----------------7 AVGLRECL------------1200 BUFSPACE------
RKP--------------------5 MAXLRECL------------1200 EXCPEXIT------
AXRKP----------------283
SHROPTNS(4,4) SPEED UNIQUE NOERASE INDEXED
UNORDERED NOREUSE SPANNED NONUNIQKEY
STATISTICS
REC-TOTAL----------14226 SPLITS-CI--------------3 EXCPS---------
REC-DELETED-----------84 SPLITS-CA--------------0 EXTENTS-------
REC-INSERTED---------407 FREESPACE-%CI---------10 SYSTEM-TIMESTA
REC-UPDATED----------126 FREESPACE-%CA----------5 X'C53893C
REC-RETRIEVED------85482 FREESPC----------4838400
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA---------5268480
SPACE-PRI--------------7 HI-U-RBA----------752640
SPACE-SEC--------------2
VOLUME
VOLSER------------PRDU25 PHYREC-SIZE---------7168 HI-A-RBA------
DEVTYPE------X'3010200F' PHYRECS/TRK------------7 HI-U-RBA------
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'003A0000' LOW-RBA----------------0 TRACKS--------
HIGH-CCHH----X'0040000E' HIGH-RBA---------5268479
INDEX ------ PAPRPR.KSCI1DU.PF00610.AIX2.INDEX
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
AIX------PAPRPR.KSCI1DU.PF00610.AIX2
ATTRIBUTES
KEYLEN-----------------7 AVGLRECL---------------0 BUFSPACE------
RKP--------------------5 MAXLRECL------------3065 EXCPEXIT------
SHROPTNS(4,4) RECOVERY UNIQUE NOERASE NOWRITECHK
NOREUSE
STATISTICS
REC-TOTAL--------------1 SPLITS-CI--------------0 EXCPS---------
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS-------
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTA
REC-UPDATED------------3 FREESPACE-%CA----------0 X'C53893C
REC-RETRIEVED----------3 FREESPC----------3452928
ALLOCATION
SPACE-TYPE---------TRACK HI-A-RBA---------3456000
SPACE-PRI-------------75 HI-U-RBA------------3072
SPACE-SEC-------------15
VOLUME
VOLSER------------PRDU25 PHYREC-SIZE---------3072 HI-A-RBA------
DEVTYPE------X'3010200F' PHYRECS/TRK-----------15 HI-U-RBA------
VOLFLAG------------PRIME TRACKS/CA--------------1
EXTENTS:
LOW-CCHH-----X'0042000E' LOW-RBA----------------0 TRACKS--------
HIGH-CCHH----X'0047000D' HIGH-RBA---------3455999
PATH ------- PAPRPR.KSCI1DU.PF00610.PATH2
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
AIX------PAPRPR.KSCI1DU.PF00610.AIX2
DATA-----PAPRPR.KSCI1DU.PF00610.AIX2.DATA
INDEX----PAPRPR.KSCI1DU.PF00610.AIX2.INDEX
DATA-----PAPRPR.KSCI1DU.PF00610.DATA
INDEX----PAPRPR.KSCI1DU.PF00610.INDEX
ATTRIBUTES
UPDATE

Listcat for
PAPRPR.KSCI1DU.PF00610.AIX2.DATA
********************************* Top of Data *********************************
DATA ---------- PAPRPR.KSCI1DU.PF00610.AIX2.DATA
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
AIX------PAPRPR.KSCI1DU.PF00610.AIX2
ATTRIBUTES
KEYLEN-----------------7 AVGLRECL------------1200 BUFSPACE------
RKP--------------------5 MAXLRECL------------1200 EXCPEXIT------
AXRKP----------------283
SHROPTNS(4,4) SPEED UNIQUE NOERASE INDEXED
UNORDERED NOREUSE SPANNED NONUNIQKEY
STATISTICS
REC-TOTAL----------14226 SPLITS-CI--------------3 EXCPS---------
REC-DELETED-----------84 SPLITS-CA--------------0 EXTENTS-------
REC-INSERTED---------407 FREESPACE-%CI---------10 SYSTEM-TIMESTA
REC-UPDATED----------126 FREESPACE-%CA----------5 X'C53893C
REC-RETRIEVED------85482 FREESPC----------4838400
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA---------5268480
SPACE-PRI--------------7 HI-U-RBA----------752640
SPACE-SEC--------------2
VOLUME
VOLSER------------PRDU25 PHYREC-SIZE---------7168 HI-A-RBA------
DEVTYPE------X'3010200F' PHYRECS/TRK------------7 HI-U-RBA------
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'003A0000' LOW-RBA----------------0 TRACKS--------
HIGH-CCHH----X'0040000E' HIGH-RBA---------5268479

Listcat for PAPRPR.KSCI1DU.PF00610.AIX2.INDEX

********************************* Top of Data *********************************
INDEX --------- PAPRPR.KSCI1DU.PF00610.AIX2.INDEX
IN-CAT --- UCAT.TSO.ICFCAT
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.045
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
AIX------PAPRPR.KSCI1DU.PF00610.AIX2
ATTRIBUTES
KEYLEN-----------------7 AVGLRECL---------------0 BUFSPACE------
RKP--------------------5 MAXLRECL------------3065 EXCPEXIT------
SHROPTNS(4,4) RECOVERY UNIQUE NOERASE NOWRITECHK
NOREUSE
STATISTICS
REC-TOTAL--------------1 SPLITS-CI--------------0 EXCPS---------
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS-------
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTA
REC-UPDATED------------3 FREESPACE-%CA----------0 X'C53893C
REC-RETRIEVED----------3 FREESPC----------3452928
ALLOCATION
SPACE-TYPE---------TRACK HI-A-RBA---------3456000
SPACE-PRI-------------75 HI-U-RBA------------3072
SPACE-SEC-------------15
VOLUME
VOLSER------------PRDU25 PHYREC-SIZE---------3072 HI-A-RBA------
DEVTYPE------X'3010200F' PHYRECS/TRK-----------15 HI-U-RBA------
VOLFLAG------------PRIME TRACKS/CA--------------1
EXTENTS:
LOW-CCHH-----X'0042000E' LOW-RBA----------------0 TRACKS--------
HIGH-CCHH----X'0047000D' HIGH-RBA---------3455999

I don't have the actual error message, was just inbformed to increase the index for alternate index2
user was trying to update a field in online screen , but the field with value 666666 is actually connected to 99 other codes via the alternate index.

thanks.

Re: How to EXTEND VSAM alternate index?

PostPosted: Mon Dec 14, 2009 7:24 pm
by expat
Well, I usually use a value of RECORDSIZE(30 32800) for an AIX.

Without seeing too much else it may be that the recordsize of the AIX is not long enough to store all associations.

Re: How to EXTEND VSAM alternate index?

PostPosted: Tue Dec 15, 2009 1:09 pm
by archiegaw
thanks fopr the help . I tried to define an alternate index with RECORDSIZE(32767 32767).
How do i compare if my alternate index is the same with the production one .
Also for extending of 1 index, do i have to delete the whole cluster? or just the index?

I'm a newbie with VSam alternate index:)

Re: How to EXTEND VSAM alternate index?

PostPosted: Thu Dec 17, 2009 12:31 pm
by archiegaw
Hi,

I was able to define and build alternate index using a copy of the production base vsam file.
Checking the listcat for the alternate indexes , they are exactly the same as the production alternate index.

but when using file manager to compare record by record for the alternate index. there are some difference.
the alternate indexes have the same record count. but the actual data in them, there are some differences, is this to be expected? the prod alternate index was define and built 2009.045 , but my test one was define and built dec 17 2009. will there be a difference bec ause of this?

also is there a way to copy including the alternate indexes in mainframe?

thanks,
Archie

Re: How to EXTEND VSAM alternate index?

PostPosted: Fri Dec 18, 2009 12:45 am
by dick scherrer
Hello,

If there is the same number of index values/entries all should be well. . .

What is the "actual data" that has differences?

Due to when/how data was written to the file, there might be some physical differences (i.e. where a record currently resides in the file). This should not be a problem. If all of the records for a key are read, the same records should be returned.

Re: How to EXTEND VSAM alternate index?

PostPosted: Fri Dec 18, 2009 10:32 am
by archiegaw
dick scherrer wrote:Hello,

If there is the same number of index values/entries all should be well. . .

What is the "actual data" that has differences?

Due to when/how data was written to the file, there might be some physical differences (i.e. where a record currently resides in the file). This should not be a problem. If all of the records for a key are read, the same records should be returned.



thanks Dick, I tried to recopy the production vsam file , and it has updates vs the file which i copied yesterday. then i built the alternate index and there were also differences with the alternate index built yesterday and today the record with the difference looks like those that have been updated in the base file.

Re: How to EXTEND VSAM alternate index?

PostPosted: Fri Dec 18, 2009 10:36 am
by dick scherrer
Hello,

So this means all is well now?

Re: How to EXTEND VSAM alternate index?

PostPosted: Fri Dec 18, 2009 11:14 am
by archiegaw
dick scherrer wrote:Hello,

So this means all is well now?



yup :) thanks . Will proceed with testing now. really appreciate the help =)