My requirement is to increase two fields in output field
Code:
ie
Record Type
From To Length Field
1 4 4 Record type
5 8 4 Department cod
9 12 4 Commodiyt /* Which should be increased to length 25 ie adding another 21 blank/*
13 72 60 Product description /*
Which should be increased to length 100 ie adding another 40 blank */
While executing this i got Return Code : 16 with below error message
Code:
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 14:17 ON THU DEC
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,12,13:21X,34:13,72,94:40X,134:73,80)
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-K06751 E7-K90000
ICE052I 3 END OF DFSORT
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
You will need to adapt the positions to suit your needs, but this works OK for me to reformat records.
This basically puts 21 spaces after the first 14 bytes, then the 4 bytes from column 15 and then pads the record to 120 bytes with spaces.
The SORTIN DD * input is 80 bytes and the SORTOUT output is 120 bytes.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Code:
OUTREC FIELDS=(1:1,12,13:21X,34:13,72,94:40X)
The reason you got an error for this is that the 34:13,72 and 94:40X fields overlap (34:13,72 ends after 94). It's not clear what you really want to do, but it would be something like this: