MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

want to display the amount as ($5.00)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
i413678
Beginner


Joined: 28 Jan 2005
Posts: 4
Topics: 3

PostPosted: Thu Dec 15, 2005 8:26 am    Post subject: want to display the amount as ($5.00) Reply with quote

Hi,

I want to display the amount like ($5.00)

my picture clause is $(6)9.9(2) and I inserted ( before and ) after this amount field and I am getting the value as ( $5.00) but I want to display as ($5.00).

means I dont want to display the spaces between left parenthesis and dollar symbol.

thanks in advance

pavan
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 15, 2005 9:02 am    Post subject: Reply with quote

i413678,

Try this

Code:

01  W-NUM.                                     
    05  W-VAL                PIC $$$$$$9.99.
    05  W-END                PIC X.         

MOVE 5.00 TO W-VAL                         

INSPECT W-VAL REPLACING ALL " $" BY "($"   

MOVE ')' TO W-END                           

DISPLAY 'THE EDITED VALUE IS     :' W-NUM   



Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Maximus
Beginner


Joined: 17 Nov 2005
Posts: 21
Topics: 11

PostPosted: Tue Dec 20, 2005 1:21 am    Post subject: Reply with quote

Hi ,

We can also do in this way,

CODE:

01 W-NUM.
02 W-BEGIN PIC X VALUE '('.
02 W-VALUE PIC $$$$$$9.99.
02 W-END PIC X VALUE ')'.

MOVE 5.00 TO W-VALUE.
DISPLAY 'THE EDITED VALUE IS :' W-NUM
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Tue Dec 20, 2005 4:18 am    Post subject: Reply with quote

and you'll get
Code:

(     $9.99)

but not
Code:

($9.99)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group