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

a. Can the OPTIONAL clause in COBOL only be coded for input files? b. If it is coded for files opened in OUTPUT, I-O or EXTEND mode, will it give a compilation error? c. If there are no compilation errors and if such files are not coded in the JCL, will the OPEN statement run fine when these files are opened? d. How will a WRITE statement work for the above files?

2 Answers  


How to code fscode 10 in cobol program? Where yoy code in your pgm?give ans for the question.

2 Answers   IBM,


record length in spool?

2 Answers   Infosys,


What is the default value(s) for an initialize and what keyword allows for an override of the default?

0 Answers  


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  






I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,


what is Pic 9v99 Indicates?

2 Answers  


What R 2 of the common forms of the EVALUATE STATEMENT ?

1 Answers   Cap Gemini,


COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error

1 Answers   TCS,


Give some examples of command terminators?

0 Answers  


Minimum how many Number of Paragraphs are there in ID- Divison?

7 Answers   IBM,


What are options have been removed in COBOL 11?

1 Answers  


Categories