Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Alternate key file status 39

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Alternate key file status 39
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: 7913
Location: Bellevue, IA

PostPosted: Thu Jul 25, 2013 4:50 am    Post subject:
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    Post subject: Reply to: Alternate key file status 39
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 25, 2013 11:41 am    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Thu Jul 25, 2013 2:50 pm    Post subject:
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    Post subject: Reply to: Alternate key file status 39
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: 7913
Location: Bellevue, IA

PostPosted: Fri Jul 26, 2013 6:41 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Fri Jul 26, 2013 7:53 pm    Post subject:
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: 31
Location: Chennai

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

Rough guess1 :
ACCT-ACCOUNT-ID could be wrong in copybook...!
Rough guess2 :
RECSZ might be wrong..
plz check http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us