how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?

Answers were Sorted based on User's Feedback



how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?..

Answer / rana

COMP1 and COMP2 are the Single precision (Full word - 4
bytes) and Double precision (Double word - 8 bytes)
respectively.
They don't contain the Picture Clause.

COMP-3 will contain 8 Bytes.

Is This Answer Correct ?    30 Yes 4 No

how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?..

Answer / shiva

COMP1-IT OCCUPIES 4 BYTES TO STORE UP TO 18 CHARACTERS
COMP2-IT OCCUPIES 8 BYTE TO STORE UP TO 18 CHARACTERS
COMP3-IT OCCUPIES HALF BYTE FOR EACH CHARACTER AND HALF BYTE
FOR SIGN...FOR ODD DATA LENGTH SO IT OCCUPIES
(15/2=7.5)+(1/2)=7.5+0.5=8 BYTES.

Is This Answer Correct ?    21 Yes 1 No

how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?..

Answer / srinivasa yadav

COMP1 : IT TAKES 4 BYTES OF MEMORY.
COMP2 : IT TAKES 8 BYTES OF MEMORY.
COMP3 : IT TAKES 8 BYTES OF MEMORY.

Is This Answer Correct ?    18 Yes 2 No

how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?..

Answer / raghunathareddy

3bytes

Is This Answer Correct ?    3 Yes 28 No

Post New Answer

More COBOL Interview Questions

What is report-item?

1 Answers   IBM,


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

0 Answers   HCL,


What is the maximum length of a field you can define using COMP-3 in COBOL?

1 Answers   UGC Corporation,


file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,






What is the difference between Perform para and perform asaection in cobol?

3 Answers   TCS,


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.

8 Answers   Danske, iGate,


what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


What is the difference between index and subscript?

5 Answers   Visa,


Explain about level numbers?

3 Answers  


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


Categories