View previous topic :: View next topic
|
Author |
Message |
chennai
New User
Joined: 12 Jun 2008 Posts: 26 Location: chennai
|
|
|
|
Using sort I need to convert $1,232,345.85- to 1232345.85-
can this be done using sort?
Thanks |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
You could try using DFSORT's SQZ function, PREBLANKing the dollar and comma signs.
Garry. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can do this with SFF and EDIT, but you need to give some more information. Show some more examples of your input values and expected output values (e.g. positive values, smaller values like 1.23, etc). Use code tags to show the input values and expected output values. Give the starting position and length of the input field and output field. Give the RECFM and LRECL of the input file and output file.
Going by just the one value you showed, you could use these DFSORT control statements:
Code: |
OPTION COPY
INREC BUILD=(1,14,SFF,EDIT=(TTTTTTT.TTS),SIGNS=(,,,-))
|
But those may not be the right statements depending on what other values you have/want. |
|
Back to top |
|
|
chennai
New User
Joined: 12 Jun 2008 Posts: 26 Location: chennai
|
|
|
|
Thanks Frank I will try and let u know ...thanks once again |
|
Back to top |
|
|
chennai
New User
Joined: 12 Jun 2008 Posts: 26 Location: chennai
|
|
|
|
Hi Frank ...I am not getting the minus symbol at the end please suggest |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Oops. That should be SFF (signed free form), not UFF (unsigned free form).
Code: |
OPTION COPY
INREC BUILD=(1,14,SFF,EDIT=(TTTTTTT.TTS),SIGNS=(,,,-))
|
I've corrected my original post. |
|
Back to top |
|
|
|