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
 
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am

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