What is difference between com and com3? Eg. s9(4) so what
is the memory it will occupy com and com3.

Answers were Sorted based on User's Feedback



What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and co..

Answer / karan

s9(4) ---- 2bytes(COM)
s9(4) ---- 3bytes(COM-3)

Is This Answer Correct ?    12 Yes 1 No

What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and co..

Answer / rekha

comp | comp-3

___________________________|__________________________________1>it
will store the data | it will store the data in PACKED in
BINARY FORMAT | DECIMAL FORMAT
2>s9(1)-s9(4) --> 2byts | s9(n)
s9(5)-s9(9) --> 4bytes | if n --> even occupies (n/2)+1b
s9(10-s9(18) -->8bytes | if n --> odd occupies (n+1)/2b
3> it will occupies the | it will occupy less memory
memory based on the range |
____________________________________________________________ex
- s9(4) occupies 2bytes for comp
s9(4) occupies 3bytes for comp-3

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More COBOL Interview Questions

how to move the records from file to array table. give with code example

0 Answers   ADP, Syntel,


I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..

3 Answers   iGate,


How may divisions are there in JCL-COBOL?

5 Answers   IBM,


can we use COPY statement in w-s section? how?

3 Answers  


what is Pic 9v99 Indicates?

2 Answers  


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


Hi Guys, I have faced one interview question if I have requirement to add 5 new columns to existing table what are prerequisite do i need to take.

1 Answers  


What was removed from COBOL in the COBOL II implementation?

0 Answers  


what is record label is empty or standard in file description of data division?

2 Answers   HCL,


in a indexed file what is procedure for read the records from 12 to 18. please give the code example

2 Answers   L&T,


What is SQL Code -904 and -903 in DB2 And how to handle it?

1 Answers   IBM,


Can we call a CICS program from a batch program or viceversa?If so, how?

3 Answers  


Categories