I have a input variable file with length of 450(446+4). My requirement is to copy it to a fixed output file with added sequence number for first 8 bytes. I used below code in SORT step, but it is giving me error. Please advise.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Did you look up the message, and see what the reason-code (4) means?
This is what I suggested:
Code:
BUILD=(SEQNUM,8,ZD,5,446)
That says, "put an 8-digit zoned-decimal sequence number, and follow it with data from the first data-position (5) for a length of 446).
This is what you coded:
Code:
BUILD=(SEQNUM,8,ZD,1:5,446)
This says, "put an 8-digit zoned-decimal sequence number, and immediately, illegally, try to squish it with the data by attempting to put it at column one".