Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to format $1,23,456.85 to 1232345.85

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to format $1,23,456.85 to 1232345.85
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

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Oct 29, 2008 6:01 pm    Post subject:
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 Moderator


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

PostPosted: Wed Oct 29, 2008 8:57 pm    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Oct 30, 2008 9:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 0 Tue Oct 24, 2017 12:01 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 3 Mon Oct 23, 2017 8:47 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us