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
 
How sign is stored in COMP-3 Usage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How sign is stored in COMP-3 Usage
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: 3158
Location: Tucson AZ

PostPosted: Tue Dec 19, 2006 8:43 pm    Post subject: Re: COMP-3 Usage : DOUBT
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    Post subject:
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    Post subject: Hi....
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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am

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