Author: Robert Sample
Posted: Sat Jul 02, 2016 8:51 am (GMT 5.5)
Actually, the 04 reason code does not mean this at all. From the messages manual:
You read the first paragraph in the error manual, without looking at the reason code (or not understanding what the reason code means) and went off on a wild goose chase for inconsistent formats when your problem was something else entirely.
I took your SORT statements and rearranged them as
so there is no overlapping, and the code worked and produced an output data set. If you read the manual on the OUTREC statement, as I did, you will find that any gaps you leave in your FIELDS will be filled with spaces so you need to put the fields in ascending column sequence when coding it.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
Posted: Sat Jul 02, 2016 8:51 am (GMT 5.5)
Quote: |
it is found that data that is passed which is inconsistent with the format that is defined |
Quote: |
4.A column overlapped the previous output field in the reformatted record. Example (fixed-length input): INREC IFTHEN=(WHEN=INIT, BUILD=(81:SEQNUM,8,ZD)), IFTHEN=(WHEN=(81,8,ZD,EQ,+1), BUILD=(3,20,20:C'ABC')) |
I took your SORT statements and rearranged them as
Code: |
OUTREC FIELDS=(1:1,4, 5:+0,TO=PD,LENGTH=8, 13:+0,TO=PD,LENGTH=8, 21:+0,TO=BI,LENGTH=4, 25:5,8,33:13,8,41:21,4, 45:45,10) |
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth