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

Insert sign and doller($) symbol.


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

New User


Joined: 18 May 2007
Posts: 28
Location: Hyderabad

PostPosted: Mon May 11, 2009 7:53 pm
Reply with quote

Hi,

My input looks like below in 132 position in a flat file.

-0000000114612
0000000114612
-0000000111103

I need to get an out put as below:

-$1,146.12
$1,111.03
-$1,146.12

I tried using the following code:

Code:
132,14,ZD,EDIT=(S$III,III,III,IIT.TT),LENGTH=15,SIGNS=(-,+)


I got out put as below.
-$1,146.12
-$1,111.03
-$1,146.12

I changed the sign key word as SIGNS=(+,-)
Code:
132,14,ZD,EDIT=(S$III,III,III,IIT.TT),LENGTH=15,SIGNS=(+,-)

it gave a result as

+$1,146.12
+$1,111.03
+$1,146.12

Could any body help me out with my issue.

Thanks in advance.
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: Mon May 11, 2009 9:23 pm
Reply with quote

Your input is NOT ZD format and you have the SIGNS wrong. You need to use SFF (signed free form) format instead and the correct SIGNS values like this:

132,14,SFF,EDIT=(S$III,III,III,IIT.TT),LENGTH=15,SIGNS=(,-)

The output will be:

Code:

     -$1,146.12 
      $1,146.12 
     -$1,111.03 


For more details on DFSORT formats, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/C.0?DT=20080528171007
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 Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
Search our Forums:

Back to Top