What is the difference between comp and comp-3 usage?
Explain other COBOL usage?s.

Answer Posted / elite group

Comp -- binary form
Comp-3 Packed Decimal

Usages are:
Display: Default it occupies the number of bytes is equal
to the size of the data-item
Comp -- Binary Number of bytes is equal to the size of the
data-item
Comp-1 -- 4-Bytes no pic clause is required
Comp-2 -- 8-byted no pic caluse is required, Double
precision
Comp-3 -- Packed Decimal Number of bytes is
(n+1)/2 -- if n is odd
(n/2)+1 -- if n is even
Comp-4 --- Same as Comp

Is This Answer Correct ?    57 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why did you choose to work with ibm mainframe cobol programming?

631


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1806


Write down the divisions of cobol program?

671


how do you reference the printer file formats from cobol programs

665


How many bytes S(8) comp field occupy and its maximum value?

1631






What are the different rules to perform a Search?

618


Write some characteristics of cobol as means of business language.

619


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


What is the difference between Global and External Variables?

666


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

717


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1115


What type of SDLC u followed? Why?

1520


How do you define a variable of comp-1 and comp-2?

704


How do you get the data to code the BMS macro?

1476


Difference between array and sub-script ?

1166