a pic s9(4) comp
b pic s9(4) comp-3
c ????????????????
d ????????????????
move a to c
add a+B giving d.

what is ur declaration for c,d?

Answers were Sorted based on User's Feedback



a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B g..

Answer / mithlesh

since A is the comp field it takes 2 bytes space and B is
the comp-3 field it takes 3 bytes .

Now for the the declaration C and D they must be declaraed
into s9(4) and S9(5) pic caluse.

Is This Answer Correct ?    3 Yes 0 No

a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B g..

Answer / lu

before answering this questions, i say "you need to code
PROPERLY, CORRECTLY" ok ....you add S9() comp to S9() comp.
comp-3 with comp-3...ok...

Is This Answer Correct ?    0 Yes 0 No

a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B g..

Answer / vinodquestion

I dont know what you need mr. LU. My question is in place of '?' what do you code for that manipulations.. i.e give declarations for c,d and it satisfies both move,add operations.. if it is not possible give me your conclusion...

Is This Answer Correct ?    0 Yes 0 No

a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B g..

Answer / abhay

C should be declared as S9(04)
D should be declared as s(05)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


How to define a array dynamically.....

5 Answers   Fidelity,


Can we use redefine clause in occurs clause?

10 Answers  


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


What is length is cobol?

0 Answers  






can we use 77 level no for Redefines?if we use give an example?

3 Answers   Mphasis,


Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


Difference between file status codes 02 and 22.... since both are for duplicate key detection.

1 Answers  


How you can delete a record from a ps file in cobol?

1 Answers  


where do u use low-value and high value in cobol

3 Answers   CGI,


How include time & date in the report generation in cobol programing?

2 Answers  


Categories