Skip to content

DBzTech-Technology Dossier

A repository of technical findings.

Menu
  • COBOL
  • DB2
  • SAS
  • JCL
  • Google Cloud
  • AI
Menu

Fix for ICE251A MISSING RDW OR DATA FOR *OUTREC in DFSORT

Posted on November 4, 2025May 17, 2026 by DBZtech

If you work with IBM DFSORT or ICETOOL, sooner or later you may encounter a cryptic error message like this:
ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0ICE751I 0 C5-I79519 C6-NONE   C7-I76950 C8-I76518 E9-I96983 E7-I76950ICE052I 3 END OF DFSORT 

ICE251A — a severe DFSORT error message.

⚙️ Common Causes
Variable-length (VB) file treated as Fixed (FB)
DFSORT adds a 4-byte Record Descriptor Word (RDW) to variable-length records.
If you accidentally process a VB file as FB, DFSORT may misread data and think it’s missing bytes.

So quick fix is to add (1,4) in the OUTREC fields before as highlighted in RED. There are other ways to fix this, but this is quick fix.

//STEP02  EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT= *                
//SORTIN DD [email protected],DISP=SHR        
//SORTOUT DD SYSOUT=*                            
//SYSIN DD *                                     
 SORT FIELDS=COPY -                              
  INCLUDE COND=(5,1,CH,EQ,C'I') -                 
  OUTREC  FIELDS=(1,4,25,10)                      
/*

Also, DFSORT system messages will also inform you in spool that the file is VB and it’s starting point is 5.

So need to add 4 bytes to starting bytes from where you want to build the OUTREC. Thus in the example above the requirement is to build the OUTREC FROM 21 bytes. So (21+4=25) was mentioned as the starting position for OUTREC FIELDS.

©2026 DBzTech-Technology Dossier | Design: Newspaperly WordPress Theme