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
 

 

Use of editing characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Fri Jan 20, 2006 2:21 am    Post subject: Use of editing characters
Reply with quote

I have a variable of length PIC9(5).9(2).

I have given this number and I want to display the number as -124.35. How should I code the PIC clause?
Back to top
View user's profile Send private message

Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Fri Jan 20, 2006 2:27 am    Post subject:
Reply with quote

You could move this value into a variable with PIC caluse -zzz99.99
Back to top
View user's profile Send private message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Fri Jan 20, 2006 2:38 am    Post subject: Re: Use of editing characters
Reply with quote

Hi Ramya,

Thanx for reply.

I think zzz is used for zero suppression. It suppresses zeroes to spaces. Am I right? If I am, then what is the correct solution?

Thank you,
Brahma
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Fri Jan 20, 2006 3:10 am    Post subject:
Reply with quote

You are correct....zzz is used to suppress zeroes...

since your input value is 9(5).9(2), you may have a number -0012.45 which would be displayed as -12.45 if you move into the PIC clause that I specified.

Let me know if I'm wrong.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Jan 20, 2006 7:06 am    Post subject:
Reply with quote

Sorry, Ramya, it doesn't work that way. If you use ----9.99 you'll get
-124.35.

It allows the sign to "float". You can do the same w/a $ sign.
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Fri Jan 20, 2006 8:55 am    Post subject:
Reply with quote

oops....i got it!
Thanks for correcting me Jack...
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Trasnmitting a file with french chara... spoorni IBM Tools 1 Wed Feb 24, 2016 8:13 pm
No new posts Editing "member generations"... Ricardo Viegas TSO/ISPF 1 Tue Dec 29, 2015 7:27 pm
No new posts FTP of french characters in a txt fil... naresh54 IBM Tools 2 Thu Nov 12, 2015 8:12 am
No new posts special characters db2 unload Ashish.Srivastava.123 DB2 10 Thu Jun 25, 2015 12:21 am


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