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

How sign is stored in COMP-3 Usage


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

New User


Joined: 30 Nov 2006
Posts: 12
Location: Ahmedabad

PostPosted: Tue Dec 19, 2006 8:36 pm
Reply with quote

Hi Friends,

In COMP-3 The SIGN is stored separately as the rightmost half-a-byte regardless of whether S is specified in the PICTURE or not.

The hexadecimal number C or F denotes a positive sign.

My question is ::

How it is decided whether to use hexadecimal number C or F

Example ::

77 I PIC 9(3) COMP-3 VALUE IS 374

the internal representation will be ::

0011 0111 0100 1111 i.e 374F

Is it possible like this ::

0011 0111 0100 1100 i.e 374C



Hope I am clear in my QUESTION.

Regards,
JITU

icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Dec 19, 2006 8:43 pm
Reply with quote

77 I PIC S9(3) COMP-3 VALUE IS 374
will produce the 0011 0111 0100 1100 i.e 374C
Back to top
View user's profile Send private message
jcbhimani

New User


Joined: 30 Nov 2006
Posts: 12
Location: Ahmedabad

PostPosted: Tue Dec 19, 2006 8:44 pm
Reply with quote

Thankx a lot William for that QUICK reply........... icon_biggrin.gif
Back to top
View user's profile Send private message
ajaygowda

New User


Joined: 14 Oct 2006
Posts: 2
Location: bangalore

PostPosted: Wed Dec 20, 2006 12:00 am
Reply with quote

the sign is always stored in the last nibble always and t sign wil be stored in hex format.
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts STEM usage in REXX CLIST & REXX 14
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
Search our Forums:

Back to Top