IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to format $1,23,456.85 to 1232345.85


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chennai

New User


Joined: 12 Jun 2008
Posts: 26
Location: chennai

PostPosted: Wed Oct 29, 2008 3:20 pm
Reply with quote

Using sort I need to convert $1,232,345.85- to 1232345.85-
can this be done using sort?

Thanks
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Oct 29, 2008 6:01 pm
Reply with quote

You could try using DFSORT's SQZ function, PREBLANKing the dollar and comma signs.

Garry.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Oct 29, 2008 8:57 pm
Reply with quote

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
View user's profile Send private message
chennai

New User


Joined: 12 Jun 2008
Posts: 26
Location: chennai

PostPosted: Thu Oct 30, 2008 10:45 am
Reply with quote

Thanks Frank I will try and let u know ...thanks once again
Back to top
View user's profile Send private message
chennai

New User


Joined: 12 Jun 2008
Posts: 26
Location: chennai

PostPosted: Thu Oct 30, 2008 11:21 am
Reply with quote

Hi Frank ...I am not getting the minus symbol at the end please suggest
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 30, 2008 9:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
No new posts Need mmmyy date format SYNCSORT 6
Search our Forums:

Back to Top