IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Alternate key file status 39


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
suraaj

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Thu Jul 25, 2013 2:22 am
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 25, 2013 4:50 am
Reply with quote

Did you reference the alternate index or the path in your JCL for CICVSAM1?
Back to top
View user's profile Send private message
suraaj

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Thu Jul 25, 2013 8:39 am
Reply with quote

I am not referencing the alternate index nor the path in the JCL.

Regards Suraj
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 25, 2013 11:41 am
Reply with quote

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

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Thu Jul 25, 2013 2:50 pm
Reply with quote

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

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Fri Jul 26, 2013 6:34 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 26, 2013 6:41 pm
Reply with quote

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

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Jul 26, 2013 7:53 pm
Reply with quote

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

New User


Joined: 08 Apr 2008
Posts: 34
Location: Chennai

PostPosted: Thu Oct 17, 2013 7:46 pm
Reply with quote

Rough guess1 :
ACCT-ACCOUNT-ID could be wrong in copybook...!
Rough guess2 :
RECSZ might be wrong..
plz check ibmmainframes.com/about53479.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top