View previous topic :: View next topic
|
Author |
Message |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Hi
Im doing a reformat for the input record using outrec. The output file rec length is 250 chars and i'm taking only partial data from the input file using outrec. All the left over positions in output file filled in with the low values. How can i avoid this. please help..
sort card i used is:
//SYSIN DD *
SORT FIELDS=(7,4,CH,A,12,10,CH,A,24,34,CH,A)
OUTREC FIELDS=(1:C'ADR',
4:7,4,
8:12,10,
18:C' ',
38:24,34)
so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file.
thanks
Sri |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what is in position 38-71 comes from the input file, so you must have low values in the input file between 24-57, use the following to space fill from 72-250
Gerry |
|
Back to top |
|
|
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Gerry,
It worked!
Thanks alot!
Sri |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
so you must have low values in the input file between 24-57 |
Actually, the low values (binary zeros) are added by DFSORT as padding bytes when the OUTREC length is less than the output LRECL. By adding the 250:X, you ensure that blank padding is used and that the OUTREC length is equal to the output LRECL. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Frank,
the LENGTH of the OUTREC provided by the OP is 71 bytes, so if there are low values between 49-71 they are coming from the input file.
I realise that DFSORT pads out the record with binary zeroes when the OUTREC length is less than the output LRECL.
The OP said
Quote: |
so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file |
Oh, I missed where he said that. You're right. I should have said:
Some of the zero bytes come from the input record and the rest come from DFSORT padding because the OUTREC length is less than the output LRECL. |
|
Back to top |
|
|
|