when COMP-3 is preferrable?

Answers were Sorted based on User's Feedback



when COMP-3 is preferrable?..

Answer / sunny kalra

Packed Decimal representation. Two digits are stored in each byte. Last nibble is for
sign. (F for unsigned positive, C for signed positive and D for signed negative)
Formula for Bytes: Integer ((n/2) + 1)) => n is number of 9s.

Is This Answer Correct ?    5 Yes 0 No

when COMP-3 is preferrable?..

Answer / sunny kalra

Also, if you need more than 18 decimal digits, you must use COMP-3 (or DISPLAY) as COMP variables cannot exceed 18 digits while COMP-3 can be up to 31 digits.

Is This Answer Correct ?    5 Yes 1 No

when COMP-3 is preferrable?..

Answer / kiran

Hi friends Both are correct and you can make use of them as
your reference.
Packed Decimal representation. Two digits are stored in
each byte. Last nibble is for
sign. (F for unsigned positive, C for signed positive and D
for signed negative)
Formula for Bytes: Integer ((n/2) + 1)) => n is number of
9s.

if you need more than 18 decimal digits, you must use COMP-
3 (or DISPLAY) as COMP variables cannot exceed 18 digits
while COMP-3 can be up to 31 digits.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

Syntax for JCLLIB & JOBLIB???

1 Answers  


hai friends ,i have HSBc exam on this sunday,my platform is Mainframe,i have 1 year exp,pls any one send me placement papers of Hsbc and technical questions on mainframe

6 Answers   Citi Bank, CitiGroup, HSBC, iNautix, Wipro,


Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad

35 Answers  


How include time & date in the report generation in cobol programing?

2 Answers  


Are you comfortable in cobol or jcl?

0 Answers  






what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

1 Answers  


In COBOL "BEFORE" advancing is there or not ?

3 Answers  


What are the different ways to run a COBOL DB2 program using JCL?

2 Answers  


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


A paragraph PARA-X is to be executed when none of the data names A, B and C have value of 1. Which of the following will achieve this ? (a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X (B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X (C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X (C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X

3 Answers   TCS,


what is difference between cobol and cobol/400

1 Answers   HCL,


Categories