View previous topic :: View next topic
|
Author |
Message |
ramsfm
New User
Joined: 05 May 2006 Posts: 12 Location: Pune
|
|
|
|
Hi,
Can any one help me on the below requirement.
I would like to convert 3 digit precession to 2 digit precesion.
ex:
I/P: the amount value from input file like: 000155.340 or 000155.345
The output should be 000155.34
I don't want to disturb the rest of the record, simply i want to convert 3 digiti precession into 2 digit precession value.
Thanks,
Ramesh. |
|
Back to top |
|
|
ramsfm
New User
Joined: 05 May 2006 Posts: 12 Location: Pune
|
|
|
|
Hi,
Can any one help me on this.
I want to convert my input 2 digit precession amount value into 3 digit precession value.
ex: The amount value from input file is : 000155.34
The output value should be: 000155.340 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
For question 1, it sounds like you just want to replace whatever is in the third digit after the decimal point with a blank. You can use these DFSORT control statements to do that where c is the starting position of your 10 byte field + 9 (e.g. if your field starts in position 11, c is 20):
Code: |
OPTION COPY
INREC OVERLAY=(c:X)
|
This overlays the third digit with a blank.
For question 2, it sounds like you just want to replace the blank in the third digit with a '0'. That would be:
Code: |
OPTION COPY
INREC OVERLAY=(c:C'0')
|
|
|
Back to top |
|
|
|