Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Code:
BUILD=(5,43) or BUILD=(5,39)
When you CONVERT to fixed-length, you BUILD to the fixed-length you want to see on the output, but based on the variable-length of your input to the BUILD. Basically, adjust everything by four to ignore the RDW. Depending how you've calculated 43 already, that may not need to change.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
DFSORT is designed to do things quickly. There is no way that it correlates your INCLUDE to your processing, so it is unaware that every remaining input record has a BUILD processed for it. You need to use IFOUTLEN which sets the length of the record after the IFTHEN processing has finished.
In a COPY it is not going to make any difference for performance between the INREC, OUTREC and OUTFIL. I still use INREC to "cut it down early". Obviously the impact is when there is a SORT, as reducing the record size before the data is sorted, reduces the amount of data that is tossed around.
Don't specify any DCB information (RECFM or LRECL) on the DD for the output file(s). It means there are two places to maintain the data. SORT will set up everything correctly, which with your example would be the long value, but would change when you make the change to the Control Cards.
Code:
INCLUDE COND=((206,7,FS,EQ,NUM),OR,
(328,3,CH,EQ,C'010',OR,328,3,CH,EQ,C'019'))