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 

PIC clause to get sign at the end of number??

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


Joined: 12 Sep 2006
Posts: 1
Topics: 1

PostPosted: Wed Apr 04, 2007 1:18 pm    Post subject: PIC clause to get sign at the end of number?? Reply with quote

Hi,
I have declared a report variable as below:

WS-AMOUNT PIC ---,---,--9V99

WS-AMOUNT can be positive or negative. With the above picture
clause, sign + or - will be displayed before the number (such
as -2,345.56).

I want the sign to be displayed after the number i.e. 2,345.56-
Is there a way to achieve this? Commas should be there.

I have tried declaring like this:
WS-AMOUNT PIC ---,---,--9V99+
but program gave a compile error. Looks like I shouldn't use + an - in the same PIC.

Please help.

Thanks!
Appu
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 04, 2007 1:28 pm    Post subject: Reply with quote

vappara,

try defining

Code:

PIC  ZZZ,ZZZ,ZZ9.99-.


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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