IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Display - ive Sign


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabhucs01
Warnings : 1

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Tue May 17, 2005 12:28 pm
Reply with quote

if i have a variable like

05 a-var pic s9(3) value -123

then when we display the variable 'a-var' will - be specified in the output.
if not so then how is it stored.
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Tue May 17, 2005 1:10 pm
Reply with quote

'- 'sign will not be specified in the output. The sign will be stored in the last nibble (4 bits) of the a-var.
so you will get a output which gives a different value in the last digit as sign is stored in last nibble. if u want a proper display use "sign is leading separate' in the declaration.
Back to top
View user's profile Send private message
prabhucs01
Warnings : 1

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Tue May 17, 2005 1:15 pm
Reply with quote

since the above declaration is zoned numeric storage each variable will take a byte storage.isn't so?
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Tue May 17, 2005 1:21 pm
Reply with quote

yes.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to display the leading zeros of a... DB2 7
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Unable to display comp variable COBOL Programming 4
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
Search our Forums:

Back to Top