I have the requirement to add one field in the variable record structure and that will increase the length of the overall file. Following is the senario.
I have the file of Lrecl 8130 Blksize 8134 and Recfm=VB and now i want to insert the field of 16 bytes starting from the position 131 which will be having the value '123456789SHREYAG'. So now the file should be of Lrecl 8146 with blksize 8150. I have tried the following step
- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 01:57
OPTION COPY
OUTREC FIELDS=(5,126,
131:C'123456789SHREYAG',
147:131,8000)
RECORD TYPE IS V - DATA STARTS IN POSITION 5
INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-Q95214 E7-K90000
END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You got the error message because you didn't include the RDW (1,4) in the OUTREC statement. For VB records, the RDW must be the first field or must be included in the first field. You should also use 131 without a length as the last field rather than 131,8000. For VB records, 131 without a length means from position 131 to the end of the record. Here's the correct version of the DFSORT job: