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
 

 

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 Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm


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