View previous topic :: View next topic
|
Author |
Message |
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
I am creating a VSAM file with primary and alternate key. The primary starts at 1 and of length 19 and the alternate key starts at 20 and of length 11. Please find the code for the definition and usage in the program below:
Code: |
DEFINE CL (NAME(ABCD.CBPD.VSAM.F125CIC) -
INDEXED -
KEYS (19 0)-
RECSZ(3500 3500) -
FSPC(0 10) -
SUBAL -
SPEED -
SHR (2 3)) -
DATA (NAME(ABCD.CBPD.VSAM.F125CIC.DATA) -
CYL (575 575) -
CISZ(8192)) -
INDEX (NAME(ABCD.CBPD.VSAM.F125CIC.INDEX) -
CISZ(2048) -
CYL (5 1));
DEFINE AIX (NAME(ABCD.CBPD.VSAM.F125CIC.AIX) -
RELATE (ABCD.CBPD.VSAM.F125CIC) -
KEYS (11 19)-
RECSZ(68 68) -
FSPC(4 10) -
SUBAL -
NOUPGRADE -
SPEED -
SHR (2 3)) -
DATA (NAME(ABCD.CBPD.VSAM.F125CIC.AIX.DATA) -
CYL (150 30) -
CISZ(2048)) -
INDEX (NAME(ABCD.CBPD.VSAM.F125CIC.AIX.INDEX) -
CYL (1 1) -
CISZ(2048));
SELECT MAC-CIC-VSAM-FILE ASSIGN TO DA-CICVSAM
ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY IS CARD-NUMBER
OF MAC-CIC-VSAM-REC
ALTERNATE KEY IS ACCT-ACCOUNT-ID
OF MAC-CIC-VSAM-REC
WITH DUPLICATES
FILE STATUS IS IO-STATUS-CODE.
|
I am getting a file status 39. Please advise |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Did you reference the alternate index or the path in your JCL for CICVSAM1? |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
I am not referencing the alternate index nor the path in the JCL.
Regards Suraj |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Where's the PATH definition
Did you perform the BLDINDEX operation
If you have done these, then why haven't you told us this |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
Why are you using a CISZ(8192) for 3500 byte records on the base cluster? You'd waste more than 1100bytes per CI with that as only 2x3500 records would fit into it = 7000. |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
expat,
I have given the path definition as below:
Code: |
DEFINE PATH (NAME (ABCD.CBPD.VSAM.F125CIC.AIX.PATH) -
PATHENTRY (ABCD.CBPD.VSAM.F125CIC.AIX) -
UPDATE -
)
|
I have not built the index yet as the VSAM is empty and I am loading the data with the job for which I am getting 39 file status.
Pete Wilson,
I had copied the CISZ from another JCL for VSAM definition. Have changed that to 4096.
The issue persists. Kindly help |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The process of creating an alternate index for a VSAM file is:
1. Define the base cluster
2. Load at least one record into the base cluster
3. Build the alternate index
4. Define the path for the alternate index
Note that these steps need to be done in this order.
If you are writing a program to perform step 2, then that program does NOT reference an alternate index -- PERIOD. When you have a program that you want to use the alternate index (after step 4 above), you MUST provide the PATH name in the JCL -- if your DD name is CICVSAM, then the path would be allocated to DD name CICVSAM1. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
I guess 4096 only wastes around 500 bytes per CI so half way there!
There are better options for efficient CI's but you'd have to check there were CICS buffer pools set up for them. |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
Back to top |
|
|
|