Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 995
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us