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
 
Insert sign and doller($) symbol.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
madishpa

New User


Joined: 18 May 2007
Posts: 27
Location: Hyderabad

PostPosted: Mon May 11, 2009 7:53 pm    Post subject: Insert sign and doller($) symbol.
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 Moderator


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

PostPosted: Mon May 11, 2009 9:23 pm    Post subject:
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:

http://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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am

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