what is the difference between Normal vaiable and comp
variable.
Answer Posted / naveen kumar.s
The value assigned to comp variable is stored in binary
format.The memeory allocation is also different.
For example,
77 A pic 9(8).
77 B Pic 9(8) comp.
Here,'A' occupies 8 bytes.whereas,'B' occupies 4 bytes only.
No.of Digits Bytes occupied
1-5 2
5-11 4
12-18 8
| Is This Answer Correct ? | 9 Yes | 17 No |
Post New Answer View All Answers
How do you differentiate between cobol and cobol-ii?
What is the difference between next sentence and continue in cobol programing language?
IF I mention stop run in CICS what happens?
How do u write test cases?
What is the difference between comp and comp-3 usage?
What is Pic 9v99 Indicates in COBOL?
Mention the guidelines to write a structured cobol program?
What is amode(24)?
How do you get the data to code the BMS macro?
Name the divisions, which are available in a cobol program?
What is the Purpose of Pointer in the string?
Write a cobol program making use of the redefine clause.
Difference between array and sub-script ?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic