how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is report-item?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
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?
What is the maximum length of a field you can define using COMP-3 in COBOL?
file status 00 is checked after opening the file or reading the file
What is the difference between Perform para and perform asaection in cobol?
How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.
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.
what happens if we dont close cursor in db2-cobol pgm?
What is the difference between index and subscript?
Explain about level numbers?
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.