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
 

 

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 Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts How do I right justify a string in an... rakesh17684 DB2 1 Wed Jun 08, 2016 8:01 pm
No new posts insert the same records but chancing ... danylele74 DB2 6 Mon May 02, 2016 7:22 pm
No new posts Can a DB2 insert trigger execution of... TS70363 DB2 6 Tue Nov 24, 2015 10:44 pm


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