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

what type of characters will store in last nibble of COMP-3


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

New User


Joined: 30 Jan 2004
Posts: 3

PostPosted: Wed Feb 04, 2004 4:26 pm
Reply with quote

In comp-3 the sign will store in last nibble. what type of characters we can see in the last nibble.
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Wed Feb 04, 2004 4:37 pm
Reply with quote

Hello vinayak,

Please go through the link below for more details.

www.cis.scu.edu.tw/oproom/doc/acucobol/docs/comprun/gt400419.htm

Hope this helps

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message
ksivapradeep

New User


Joined: 30 Jul 2004
Posts: 95

PostPosted: Sat Oct 02, 2004 4:45 pm
Reply with quote

hi vinayak,


the sign values are stored in last nibble like this

ex: -124

this value stored as a 124m

why it is ok,see below

the sign is stores like this
A B C D E F G H I
+1 +2 +3 +4 +5 +6 +7 +8 +9

J K L M N O P Q R
-1 -2 -3 -4 -5 -6 -7 -8 -9

}
0

depends upon the last value in the given value it stores the corresponding letter.

in our examplle the last number in the value is '4' so it store as 'M' finally the value is 124M in comp's in normal it gives 12M ok.

if any thing wrong let me know i will verify ok

regards
siva pradeep
Back to top
View user's profile Send private message
muthukumar

New User


Joined: 24 Mar 2004
Posts: 29

PostPosted: Mon Oct 04, 2004 7:37 pm
Reply with quote

Hi friends,

COMP-3 variable will save the sign bit in the last nibble separately. It can take value of C, F or D. where C,F denotes Positive and D for negative.

let me know if any clarifications required. Vinayak, Can you test this and let me know on what u get. its very easy to test this.

regards
Muthu
Back to top
View user's profile Send private message
vikas4u

New User


Joined: 12 Aug 2004
Posts: 14
Location: bangalore

PostPosted: Thu Oct 07, 2004 12:16 pm
Reply with quote

In comp-3 the sign is stored in last nibble.
i.e if the value is +100 then the value will be 0C. ( zero c )
+101 then 1C
+102 then 2C

if -100 then 0D
-101 THEN 1D
-102 THEN 2D
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 Store the data for fixed length COBOL Programming 1
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts SMF record type 30 JCL & VSAM 8
Search our Forums:

Back to Top