Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Alternate Index ended up with maxcc=12

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Alternate Index ended up with maxcc=12
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Mon Jun 29, 2009 4:04 pm    Post subject: Reply to: Alternate Index
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 29, 2009 4:44 pm    Post subject:
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    Post subject: Alternate Index
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: 8620
Location: Back in jolly old England

PostPosted: Mon Jun 29, 2009 5:31 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Mon Jun 29, 2009 5:34 pm    Post subject: Reply to: Alternate Index
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 29, 2009 5:36 pm    Post subject:
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    Post subject: Alternate Index
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 29, 2009 6:24 pm    Post subject:
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: 6970
Location: porcelain throne

PostPosted: Mon Jun 29, 2009 6:32 pm    Post subject:
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    Post subject: Alternate Index
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 29, 2009 6:33 pm    Post subject:
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 29, 2009 6:35 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Jun 29, 2009 6:45 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Jun 30, 2009 12:18 pm    Post subject:
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    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 Need help on SFTP alternate for LOCSI... ashok_uddaraju JCL & VSAM 2 Thu Oct 26, 2017 12:43 am
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us