Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
hcl,
You description of what you're trying to do is very confusing.
However, you say that your input file has LRECL=100 (or is it LRECL=140?), but your OUTREC operand has 140,61 which is trying to copy input positions 140-200. You can't copy bytes that don't exist in the record. If the record length is 100, you can't copy bytes beyond position 100. With DFSORT, you would have received this message:
ICE027A 9 END OF SORTOUT FIELD BEYOND MAXIMUM RECORD LENGTH
You need to rewrite your OUTREC operand to only include valid bytes from the input record.
Quote:
Can some body tell me how to achieve this using SORT.
You need to explain more clearly what you're trying to do before we can help you.
And whenever something is "not working", you need to post the messages you received.
While trying to copy the whole i/p file records into the o/p file new format
I am getting the error message as:
WER230A SORTOUT OUTREC FIELD OUTSIDE RANGE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
I know that the i/p file is of 100 lrecl and the o/p file is 140 lrecl.
But how can I include the new field postions 20-39, 60-79 in the o/p file in the SORT SYSIN card?
I/p file o/p file
(LRECL=100) (LRECL=140)
pos 1-19 pos-19
pos 20-39 ( new field positions in my o/p file)
pos 41-59 pos 41-59
pos 60-79 ( new field positions in my o/p file)
pos 80-100 pos 80-100
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
This should help:
OUTFIL OUTREC=(1:1,19,20:20X,40:20,20,60:20Z,80:39,61)
1:1,19, the first 19 bytes of the original file
20:20X, 20 empty bytes of blanks
40:20,20, the next 20 bytes of the original file
60:20Z, 20 empty bytes of binary zero
80:39,61 the next (and last) 61 bypts of the original file
It's all in the manual, you do have a manual, don't you?