//SYSIN DD *
SORT FIELDS=(5,2,PD,A,319,5,PD,A)
RECORD TYPE=V
INCLUDE COND=(5,2,PD,EQ,61,AND,7,4,PD,GT,2006000,
AND,55,1,CH,EQ,C'R',AND,56,2,ZD,EQ,05)
OUTREC FIELDS=(1:5,2)
/*
For this code. I am getting following error message
Here Input is the VSAM file.
Code:
ICE000I J - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 04:57 ON TUE SEP
SORT FIELDS=(5,2,PD,A,319,5,PD,A)
RECORD TYPE=V
INCLUDE COND=(5,2,PD,EQ,61,AND,7,4,PD,GT,2006000,
AND,55,1,CH,EQ,C'R',AND,56,2,ZD,EQ,05)
OUTREC FIELDS=(1:5,2)
ICE201I J RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE126A J INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE052I J END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
ICE201I J RECORD TYPE IS V - DATA STARTS IN POSITION 5
Note this message. Since you're handling the VSAM data set as variable (TYPE=V), DFSORT adds an RDW in positions 1-4 when processing the input records. So the first data byte actually starts in position 5, not 1. You need to account for the 4-byte RDW in all of your control statements. If you didn't, then change position 5 to 9, etc.
Quote:
ICE126A J INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
When processing V records, you must specify the RDW (1,4) in the OUTREC statement. The RDW is missing from yours. You need to change it to:
Code:
OUTREC FIELDS=(1,4,p,2)
where p is 5 or 9 counting from the first data byte as 5.
For more information on processing VSAM data sets with DFSORT, see:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: