Why am I Receiving an ERR124 On the Recovery of a VSAM Dataset?

Document ID : KB000029452
Last Modified Date : 14/02/2018
Show Technical Document Details

Let us suppose that one converts a dataset from ESDS to KSDS and during a recovery test one gets the following message: 

FILE-ERR124 VSAM KEY LENGTH OR OFFSET DEFINITION FOR FILE='SDBD005 ' DOES NOT MATCH THE JOURNAL RECORD KEY LENGTH.

What is one thing that one can check to resolve this message?

What might be the case is that you are pulling in records from the old pre-converted format.  One can try to limit the amount of records selected from the log stream.  This can be done by altering the DFHJ02 DD in your JCL:

//RECOVER EXEC PGM=FILESAVE,REGION=4M

//DFHJ02 DD DSN=TESTUFR1.DFHJ02,DISP=SHR,

//   SUBSYS=(LOGR,,LOCAL)

Also add the FROM= parameter to your DFHJ02 DD.  You will need to adjust the Julian date to the date you do the next test on.  Specify the starting date of the first log stream block to be processed, in Julian date format (YYYY/DDD).

 //DFHJ02 DD DSN=TESTUFR1.DFHJ02,

 //         SUBSYS=(LOGR,,

 // 'FROM=(2015/015,00:00:01),LOCAL')

 For the above sample the FROM date is January 15th, 2015.

In addition to adjusting on the LOGR SUBSYS parameter you need to adjust the date and time parameters on the SELECT statement to reflect the date range of the records you want to recover.  It is assumed that you don't want to recover any of the EDSD records and you just want to recover the records after the conversion.

If you still have a problem then please open an issue through CA Support Online.  We will need to get detailed information sent in to trouble shoot this:

  • A print of the log stream.
  • What maintenance level you are on and what PTFS have been applied after that.
  • A description of what you did to the file, and when (the dates) you did it?
  • Did you use the TSO dialog to GENERATE this recovery jcl, or did you code it manually?
  • Send us a copy of the JCL you are submitting, and the entire job output that shows the ERR124 error message.