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

Alternate Index ended up with maxcc=12


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

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Mon Jun 29, 2009 4:00 pm
Reply with quote

HI all,

I am creating a VSAM Cluster loading with some sample records.
After that I am creating an alternate index for DEPID and loading records
into it.
But ended up with maxcc=12 and the records in alternate index dataset are not in order.
Code:
IDC3351I ** VSAM I/O RETURN CODE IS 108 - RPLFDBWD = X'8408006C'

Please guide me thru the right direction
CopyBook
Code:
DCL 1 STRUC,       
    2 EMPID CHAR(4),
    2 DATE  CHAR(8),
    2 DEPID CHAR(5);


Code:
xyz.BATCH.CLU
---- +----1----+----2----+----3
*******************************
4045 20091212D1234             
4046 20091211D1231             
4047 20091111D1234 



Code:
xyz.BATCH.CLU.AIX
----+ ----1 ----+----2----+----3
********************************
      D1231 4046               
      D1234 40454047 
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon Jun 29, 2009 4:04 pm
Reply with quote

look at the manual for the IDC.... message and follow it' s advice
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 29, 2009 4:44 pm
Reply with quote

Since you didn't provide the base cluster definition, nor the alternate index definition, nor the program statements that tell how the program defines the file, nor the program statements referencing the VSAM file, nor the JCL executing the program referencing the VSAM file ... just exactly what do you expect us to be able to do other than suggest you read the manual for the error messages generated by the system?
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Mon Jun 29, 2009 5:26 pm
Reply with quote

Sorry Robert..
Please consider this as my fresh post

Code:
//STEP20   EXEC PGM=IDCAMS                 
//SYSPRINT DD SYSOUT=*                     
//INPUT DD DSN=XYZ.BATCH.INPUT.CLUSTER,DISP=SHR 
//SYSIN DD *                               
  DEFINE CLUSTER -                         
  (    -                                   
    NAME(XYZ.BATCH.CLU) -                 
    VOLUMES(*)               -             
    RECORDSIZE(17,17) -                 
    INDEXED -                               
    KEYS(4,0)              -               
    FREESPACE(10 10)         -             
    RECOVERY                 -             
    CYLINDERS(20,10)         -             
    CONTROLINTERVALSIZE(1024) -             
    FOR(365) -                             
    UNIQUE ) -                             
    DATA (NAME(XYZ.BATCH.CLU.DATA)) -     
    INDEX(NAME(XYZ.BATCH.CLU.INDEX))       
    REPRO INFILE(INPUT) -                   
          OUTDATASET(XYZ.BATCH.CLU)       
   DEFINE ALTERNATEINDEX ( -               
          NAME(XYZ.BATCH.CLU.AIX) -       
          RELATE(XYZ.BATCH.CLU) -         
          NONUNIQUEKEY -                   
          UPGRADE -                         
          VOLUMES(*) -                     
          CYLINDERS(20,10) -               
          RECORDSIZE(410,410) -             
          KEYS(5,12) )-                     
          DATA(NAME(XYZ.BATCH.AI.DATA))-   
          INDEX(NAME(XYZ.BATCH.AI.INDEX)) 
/*     
//STEP12 EXEC PGM=IDCAMS                     
//INPUT DD DSN=XYZ.BATCH.INPUT.CLUSTER,DISP=SHR   
//SYSPRINT DD SYSOUT=*                       
//SYSIN DD *                                 
   BLDINDEX INDATASET(XYZ.BATCH.CLU) -     
            OUTDATASET(XYZ.BATCH.CLU.AIX)   
   DEFINE PATH (NAME(XYZ.BATCH.CLU.IX)-     
          PATHENTRY(XYZ.BATCH.CLU.AIX))     
   REPRO INFILE(INPUT) -                     
         OUTDATASET(XYZ.BATCH.CLU.AIX)     
/*         



Code:
XYZ.BATCH.CLU.AIX
----+ ----1 ----+----2----+----3
********************************
      D1231 4046               
      D1234 40454047   


Code:
XYZ.BATCH.CLUSTE.INPUT
---- +----1----+--
******************
4045 20091212D1234
4046 20091211D1231
4047 20091111D1234


Here In my AIX dataset only one record has been processed..
and ended with maxcc=12 .
Here is the error :
Code:
0                                                                 
    REPRO INFILE(INPUT) -                                         
          OUTDATASET(XYZ.BATCH.CLU.AIX)                         
0IDC3302I  ACTION ERROR ON XYZ.BATCH.CLU.AIX                     
0IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                 
-000000  F0F0F9F1 F2                                             
                                                                 
0IDC3302I  ACTION ERROR ON XYZ.BATCH.CLU.AIX                     
0IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                 
-000000  F0F0F9F1 F1                                             
                                                                 
0IDC0005I NUMBER OF RECORDS PROCESSED WAS 1                       
0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8       
0                                                                 
0IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 8
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 29, 2009 5:31 pm
Reply with quote

What on earth are you doing

You build the alternate index and then try to REPRO something else over the top of it.

No wonder you have problems. Drop the REPRO and it should be OK.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon Jun 29, 2009 5:34 pm
Reply with quote

for what reason would You want to repro the base cluster into the AIX....
as per Your jcl
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 29, 2009 5:36 pm
Reply with quote

Suggestion: you should use the PATH name when accessing an alternate index, NOT the alternate index name.

What do you think you're doing when you do this?
Code:
REPRO INFILE(INPUT) OUTDATASET(XYZ.BATCH.CLU.AIX)
You do not ever, as far as I am aware, have to load an alternate index. The alternate index is built upon the base cluster (which is why you must have data records in the base cluster before doing the alternate index define) and VSAM generates and maintains the alternate index records for you.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Mon Jun 29, 2009 6:03 pm
Reply with quote

I thought defining a path will create logical relationship between
base cluster and alternate index..
so I used repro to load the data ..
thank you all for your help.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 29, 2009 6:24 pm
Reply with quote

Quote:
I thought defining a path will create logical relationship between
base cluster and alternate index..
That's what the RELATE on the alternate index definition does. The BLDINDEX builds the alternate index. The DEFINE PATH allows VSAM to open the alternate index and base cluster for processing as a unit, so changes to the base cluster will be reflected in the alternate index (as long as UPGRADE is specified).

By the way, why is the alternate index RECORDSIZE set to 410,410? The alternate index record size formula is 4 + aix key length + (n times base cluster key length), or 4 + 5 + (100 x 4) = 409, not 410. Furthermore, you're setting the average and maximum to be the same, which surely is not going to be the case. While this is not really wrong in the sense that VSAM will be able to use these values, there's not much logical sense to the values you're using.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 29, 2009 6:32 pm
Reply with quote

Read VSAM Demystified and you will replace your false assumptions with facts.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Mon Jun 29, 2009 6:32 pm
Reply with quote

Robert,
Yes you are right it should be 409 instead of 410.
I have given avg amd max record length same as they hold fixed length
records according to my definition of my cluster

Corrrect me if I am wrong.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 29, 2009 6:33 pm
Reply with quote

Dick I would have said "you can replace your false assumptions with facts". icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 29, 2009 6:35 pm
Reply with quote

Murugan, you do not understand alternate indexes. Read the manual Dick references. Alternate indexes, unless defined with UNIQUEKEY, are never fixed length.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Mon Jun 29, 2009 6:45 pm
Reply with quote

Quote:
I thought ...
IBM has taken that pain long back and provided us with Manuals -- for reference they are linked on the top of this page via the name "IBM Manuals"...!
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Mon Jun 29, 2009 7:21 pm
Reply with quote

Oops!! IBM has already taken pain..other wise I may create my own icon_biggrin.gif

Anyway thanks Anuj
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Jun 30, 2009 12:18 pm
Reply with quote

Sarcasm deleted by poster.
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 Cobol file using index COBOL Programming 2
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts choice of clustering index DB2 3
No new posts Secondary index error while loading d... IMS DB/DC 2
Search our Forums:

Back to Top