How will 128 be saved in s9 (3) comp-3
How will 12 be saved in s9 (2) comp

Answers were Sorted based on User's Feedback



How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp..

Answer / sriram

for comp-3 will store data in packed decimal format
s9(3)comp-3
0.5+1.5=2 bytes,
for 128 it will store c128 or f128.
for comp will store data in binary format
s9(2) will occupy 2 bytes
for 12 it will store binary format i.e 12=1100

Is This Answer Correct ?    13 Yes 2 No

How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp..

Answer / kavithachandrashekar

comp-3 is stored as (n+1)/2 where n is number of digits.Since here n is 3 for numeric 128,(3+1)/2=2 bytes.

12 8C here c represents positive(D for negative)

Comp is stored as n/2,where n is number of digits.Since n is 2 for numeric 12,(2)/2=1 byte(1/2 word)
12 is saved as 12.

Is This Answer Correct ?    7 Yes 7 No

How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp..

Answer / manohar reddy .d

n=128 it is a even number thaty (128/2)+1 65 in comp3


in comp s9(12) 8bytes it occupies

Is This Answer Correct ?    2 Yes 28 No

Post New Answer

More COBOL Interview Questions

Are you comfortable in cobol or jcl?

0 Answers  


Explain how to differentiate call by context by comparing it to other calls?

0 Answers  


How do we get current date from system with century?

2 Answers  


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  






What is static and dynamic call in cobol?

0 Answers  


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,


What are the rules of the move verb?

0 Answers  


what is level 66 means??

7 Answers  


HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER

7 Answers   Patni,


if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


Categories