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

Record out of sequence error


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

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Oct 06, 2008 12:28 pm
Reply with quote

Hi all,

I've read the posts regarding this error,i want to ask about the jcl i posted

here is the jcl i wrote to copy a seq file into vsam file
Code:
//*********************************************************************
//S030SORT EXEC PGM=SORT                                               
//*                                                                     
//*    MERGE NEW TRANSMITTAL FILE INTO THE MASTER FILE,                 
//*    EXCLUDING BLANK RECORDS                                         
//*                                                                     
//*--------------------------------------------------------------------
//*RESTART - STEP                                                       
//*--------------------------------------------------------------------
//*INPUT                                                               
//SORTIN   DD  DSN=MNAX.MFTA.WRK1.TRANSMTL,DISP=(OLD,DELETE,KEEP)       
//         DD  DSN=MNAX.MFTA.WRK2.TRANSMTL,DISP=(OLD,DELETE,KEEP)       
//SYSIN    DD  *                                                       
  SORT FIELDS=(1,6,CH,A)                                               
  OMIT COND=(1,6,CH,EQ,C'      ')                                       
//*OUTPUT                                                               
//SORTOUT  DD  DSN=MNAX.MFTA.SRT.TRANSMTL,DISP=(NEW,CATLG,DELETE),     
//             SPACE=(800,(1000,100),RLSE),AVGREC=K,                   
//             LRECL=800,RECFM=FB                                       
//SYSOUT   DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//CEEDUMP  DD  SYSOUT=*                                                 

//*********************************************************************
//S040IDCM EXEC PGM=MTIDCAMS,PARM='0004,ABEND'                         
//*                                                                   
//*    DELETE, DEFINE, RELOAD TRANSMITTAL FILE                         
//*                                                                   
//*--------------------------------------------------------------------
//*RESTART - STEP                                                     
//*--------------------------------------------------------------------
//*INPUT                                                               
//SYSIN    DD  *                                                       
   DELETE MNAX.MFTA.VSMP001.TRNSMTL PURGE                             
   DEFINE  CLUSTER -                                                   
          (NAME(MNAX.MFTA.VSMP001.TRNSMTL) -                           
           RECORDS(120000 30000) -                                     
           SHR(2 3) -                                                 
           FREESPACE(20 20) -                                         
           UNIQUE -                                                   
           NOREUSE  -                                                 
           INDEXED -                                                   
           KEYS(6 0)) -                                               
          DATA -                                                       
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.DATA) -                     
           RECSZ(800 800) -                                           
           CISZ(12288)) -                                             
          INDEX -                                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.IDX))     
   REPRO  IDS(MNAX.MFTA.SRT.TRANSMTL) -               
          ODS(MNAX.MFTA.VSMP001.TRNSMTL) REUSE       
   DEFINE ALTERNATEINDEX -                           
          (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT1) -     
           RELATE(MNAX.MFTA.VSMP001.TRNSMTL) -       
           KEYS(8 343) -                             
           RECORDS(120000 30000) -                   
           SHR(2 3) -                                 
           FREESPACE(0 0) -                           
           NONUNIQUEKEY -                             
           NOREUSE  -                                 
           UPGRADE) -                                 
          DATA -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT1DATA) -
           RECSZ(19 438013) -                         
           CISZ(4096)) -                             
          INDEX -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT1IDX)) 
   DEFINE PATH -                                     
         (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT1PTH) -   
          PATHENTRY(MNAX.MFTA.VSMP001.TRNSMTL.ALT1)) 
   BLDINDEX -                                         
         INDATASET(MNAX.MFTA.VSMP001.TRNSMTL) -       
          OUTDATASET(MNAX.MFTA.VSMP001.TRNSMTL.ALT1) 
   DEFINE ALTERNATEINDEX -                           
          (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT2) -     
           RELATE(MNAX.MFTA.VSMP001.TRNSMTL) -       
           KEYS(7 364) -                             
           RECORDS(100000 10000) -                   
           SHR(2 3) -                                 
           FREESPACE(0 0) -                           
           NONUNIQUEKEY -                             
           NOREUSE  -                                 
           UPGRADE) -                                 
          DATA -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT2DATA) -
           RECSZ(18 128012) -                         
           CISZ(2048)) -                             
          INDEX -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT2IDX)) 
   DEFINE PATH -                                     
         (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT2PTH) -   
          PATHENTRY(MNAX.MFTA.VSMP001.TRNSMTL.ALT2)) 
   BLDINDEX -                                         
         INDATASET(MNAX.MFTA.VSMP001.TRNSMTL) -       
          OUTDATASET(MNAX.MFTA.VSMP001.TRNSMTL.ALT2) 
   DEFINE ALTERNATEINDEX -                           
          (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT3) -     
           RELATE(MNAX.MFTA.VSMP001.TRNSMTL) -       
           KEYS(7 371) -                             
           RECORDS(120000 30000) -                   
           SHR(2 3) -                                 
           FREESPACE(0 0) -                           
           NONUNIQUEKEY -                             
           NOREUSE  -                                 
           UPGRADE) -                                 
          DATA -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT3DATA) -
           RECSZ(18 194012) -                         
           CISZ(2048)) -                             
          INDEX -                                     
           (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT3IDX)) 
   DEFINE PATH -                                     
         (NAME(MNAX.MFTA.VSMP001.TRNSMTL.ALT3PTH) -   
          PATHENTRY(MNAX.MFTA.VSMP001.TRNSMTL.ALT3)) 
   BLDINDEX -                                         
         INDATASET(MNAX.MFTA.VSMP001.TRNSMTL) -       
          OUTDATASET(MNAX.MFTA.VSMP001.TRNSMTL.ALT3) 
/*                                                   
//SYSPRINT DD  SYSOUT=*                               
//SYSOUT   DD  SYSOUT=*                               
//SYSABOUT DD  SYSOUT=*                               
//SYSUDUMP DD  SYSOUT=*                               
//CEEDUMP  DD  SYSOUT=*                               


In the repro step it giving

Code:
    REPRO  IDS(MNAX.MFTA.SRT.TRANSMTL) -                                                                               
          ODS(MNAX.MFTA.VSMP001.TRNSMTL) REUSE                                                                       
IDC3302I  ACTION ERROR ON MNAX.MFTA.VSMP001.TRNSMTL                                                                   
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                                                                     
000000  C5F8F0F0 F040                                                               *E8000                           *
                                                                                                                     
IDC3302I  ACTION ERROR ON MNAX.MFTA.VSMP001.TRNSMTL                                                                   
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                                                                     
000000  C5F8F0F0 F040                                                               *E8000                           *
                                                                                                                     
IDC3302I  ACTION ERROR ON MNAX.MFTA.VSMP001.TRNSMTL                                                                   
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                                                                     
000000  C5F8F0F0 F040                                                               *E8000                           *
                                                                                                                     
IDC3302I  ACTION ERROR ON MNAX.MFTA.VSMP001.TRNSMTL                                                                   
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                                                                     
000000  C5F8F0F0 F040                                                               *E8000                           *


As per my understanding i've sorted the input file inorder to remove irregularities & then loaded.
This error is coming only for this record.

Sample SRT.TRANSMTL
Code:
C89843           0438       XDISCOUNT TIRE CO ILC1                     ROMEOVILLE   IL
C89844           0403       XDISCOUNT TIRE CO ILCW                     NAPERVILLE   IL
C89845           0484       X                                                         
C89846           0207       X                                                         
C89847           0051       X                                                         
E8000            0002       X                                                         
E8000            0002       X                                                         
.

Please suggest me.i'm sorry for the long post icon_cry.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Oct 06, 2008 1:28 pm
Reply with quote

if You had looked better at Your output You would have found
that the last two records are duplicates icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 06, 2008 1:38 pm
Reply with quote

Hello,

If you modify your sort control statements, you could eliminate any duplicates.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Oct 06, 2008 1:52 pm
Reply with quote

hi enrico & dick,

i noted that they were duplicates but in this it should have copied on the alternate indices(my understanding) ... please tell me more on this
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Oct 06, 2008 1:55 pm
Reply with quote

hi,

sorry for another thread, this is a production code & exisiting ...so cannot change the sort card ...... i think there is a problem with file they sent many fields missing leading to the duplicates ..... anyways i'll confirm with the team.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 06, 2008 2:03 pm
Reply with quote

Hello,

Quote:
this is a production code & exisiting ...so cannot change the sort card
If the file arrives with duplicates, the production sort card may need to be updated to handle the duplicates.

If duplicates invalidate the entire file, then a new/corrected file would be needed.

Good luck icon_smile.gif

d
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Oct 06, 2008 2:45 pm
Reply with quote

hi further more,

Once it abends & if i run the code again with the same file ...it is running fine icon_eek.gif
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: Mon Oct 06, 2008 4:43 pm
Reply with quote

Quote:
i noted that they were duplicates but in this it should have copied on the alternate indices(my understanding)
No, the primary key is the first six bytes of the record and every primary key must be unique. Alternate indexes are allowed duplicates, but they are defined at offsets 343, 364, 371 in the file. So under no circumstances will the primary key values be copied into the alternate index fields since they are hundreds of bytes apart.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top