MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error while accessing alternate index in VSAM

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
gpaulose
Beginner


Joined: 04 Sep 2007
Posts: 10
Topics: 4

PostPosted: Tue Sep 04, 2007 10:53 am    Post subject: Error while accessing alternate index in VSAM Reply with quote

I have a VSAM file which is used in both Online and Batch programs. Recently we created an alternate index for this VSAM file. The key for the alternate index is a non-unique key and this key is also a part of the primary index key. When I try to use this alternate index from online program the program hangs at the start browse step.(This alternate index is not used in batch program).

Also, If I try to close the VSAM file in CICS region it give a 'CLOSED REQUESTED' status(PFA the screen shot). I have to restart the FOR region to make this file in closed status. Is this something wrong with the way we have defined the VSAM file?

Please help.
[/img]
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Wed Sep 05, 2007 12:58 am    Post subject: Reply with quote

How are we suppose to answer when we have no idea how you defined your vsam file? Post the relevant information, like Vsam definition, Cics defintions, Alternate Index, Build index, etc.
Back to top
View user's profile Send private message Visit poster's website
gpaulose
Beginner


Joined: 04 Sep 2007
Posts: 10
Topics: 4

PostPosted: Wed Sep 05, 2007 3:33 pm    Post subject: Reply with quote

Here is the jcl that i used to define the alternate index for VSAM.
Code:

//IDCAMS01 EXEC PGM=IDCAMS                               
//SYSUDUMP DD  SYSOUT=*  ======> SYSUDUMP STATEMENT ADDED
//SYSPRINT DD  SYSOUT=*                                   
//SYSOUT   DD  SYSOUT=*                                   
//SYSIN    DD  *                                         
       DELETE (CAOB.PILOT.CATEG.KSDS) PURGE           -   
              CLUSTER                                     
       DEFINE CLUSTER                                 -   
               (NAME(CAOB.PILOT.CATEG.KSDS)           -   
                KEYS(09  0)                           -   
                INDEXED                               -   
                RECSZ(80   80)                        -   
                FREESPACE (20  10)                    -   
                SPEED                                 -   
                SHR(2 3)                              -   
                VOLUME(* * * * *))                    -   
              DATA                                    -   
               (NAME(CAOB.PILOT.CATEG.KSDS.DATA)      -   
                CYL(10 10))                           -           
              INDEX                                   -           
               (NAME(CAOB.PILOT.CATEG.KSDS.INDEX)     -           
                CYL(1 1))                                         
/*                                                               
//****************************************************************
//****************************************************************
//REPRO    EXEC PGM=IDCAMS                                       
//SYSPRINT DD  SYSOUT=*                                           
//SYSUDUMP DD  SYSOUT=*                                           
//FILEIN   DD  DSN=SHARED.CAOP.PILOT.CATEG.KSDS,                 
//             DISP=SHR                                           
//FILEOUT  DD  DSN=CAOB.PILOT.CATEG.KSDS,                         
//             DISP=SHR                                           
//*            DISP=(NEW,CATLG,DELETE),                           
//*            DCB=(RECFM=FB,LRECL=080),                         
//*            SPACE=(CYL,(1,1),RLSE)                             
//SYSIN    DD  *                                                 
  REPRO INFILE(FILEIN) OUTFILE(FILEOUT)   REUSE                   
/*                                                             
//*************************************************************
//*************************************************************
//IDCAMS01 EXEC PGM=IDCAMS                                     
//SYSUDUMP DD  SYSOUT=*  ======> SYSUDUMP STATEMENT ADDED     
//SYSPRINT DD  SYSOUT=*                                       
//SYSOUT   DD  SYSOUT=*                                       
//SYSIN    DD  *                                               
     DEFINE ALTERNATEINDEX (                                - 
            NAME (CAOB.PILOT.CATEG.AIX1)                    - 
                  RELATE (CAOB.PILOT.CATEG.KSDS)            - 
                  FREESPACE (10 10)                         - 
                  SHAREOPTIONS (2 3)                        - 
                  KEYS (3 6)                                - 
                  NONUNIQUEKEY                              - 
                  VOLUME (* * * * *)                        - 
                  )                                         - 
            DATA (                                          - 
            NAME (CAOB.PILOT.CATEG.AIX1.DATA)               - 
                   CISZ (4096)                               -
                   CYLINDERS (20 10)                         -
                   )                                         -
             INDEX (                                         -
             NAME (CAOB.PILOT.CATEG.AIX1.INDEX)              -
                   TRACKS (1 1)                              -
                   )                                           
      DEFINE PATH (                                          -
             NAME (CAOB.PILOT.CATEG.AIX1.PATH)               -
              PATHENTRY (CAOB.PILOT.CATEG.AIX1)              -
                   NOUPDATE                                  -
                   )                                           
      BIX    IDS(CAOB.PILOT.CATEG.KSDS)                      -
             ODS(CAOB.PILOT.CATEG.AIX1)                       
 /*                                                           
 //*                                                           
 //*               RECORDSIZE (080 080)                      -
 //*             REUSE                                 -       
 //*
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Sep 06, 2007 12:51 am    Post subject: Reply with quote

Ok, you gave us information about the VSAM file, now how does your program try to read? Are you reading the path, what do the definitions in CICS look like?
Back to top
View user's profile Send private message Visit poster's website
gpaulose
Beginner


Joined: 04 Sep 2007
Posts: 10
Topics: 4

PostPosted: Fri Sep 07, 2007 1:50 pm    Post subject: Reply with quote

The CICS definition look like this. It is pointing to the path and In my CICS program I try to read the path(CAOCANDX).

Fil(CAOCANDX) Vsa Clo Une Rea Upd Add Bro Del Sha
Dsn( CAOA.PILOT.CATEG.AIX1.PATH )
Fil(CAOCATEG) Vsa Clo Ena Rea Upd Add Bro Del Sha
Dsn( CAOA.PILOT.CATEG.KSDS )
Back to top
View user's profile Send private message
gpaulose
Beginner


Joined: 04 Sep 2007
Posts: 10
Topics: 4

PostPosted: Fri Sep 07, 2007 1:54 pm    Post subject: Reply with quote

code:

Code:

 STATUS:  RESULTS - OVERTYPE TO MODIFY                       
  Fil(CAOCANDX) Vsa Clo Une Rea Upd Add Bro Del     Sha     
         Dsn( CAOA.PILOT.CATEG.AIX1.PATH                   )
  Fil(CAOCATEG) Vsa Clo Ena Rea Upd Add Bro Del     Sha     
         Dsn( CAOA.PILOT.CATEG.KSDS                        )
                                                             
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Mon Sep 10, 2007 12:49 am    Post subject: Reply with quote

Do you explicitly open the dataset with CEMT? Your CICS definitions say that the path dataset is closed and that programs can not normally open it (unenabled).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group