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

What does EXIT do ?

3 Answers   Deloitte,


using redefine can you redefine lower variable size to higher variable size?

3 Answers   Patni,


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


What is the meaning of 'Eject' verb in cobol?

2 Answers   TCS, Wipro,


How do you differentiate between cobol and cobol-ii?

0 Answers  






What is the difference between a binary search and a sequential search?

3 Answers  


9(2).99 how many bytes take? Why . consider as a byte?

2 Answers  


hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?

1 Answers   CGI,


comp-3 field occupy?

5 Answers  


can we use go to statement inline-perform?

7 Answers   IBM,


is it possible to rename 01 level?

4 Answers  


here is my compile and link edit steps in a jcl //COMPILE1 JOB (3CUS,S),'CCDM TEST' //STEPNAME EXEC PGM=IGYCRCTL,PARM='DYNAM,RENT,LIB,OBJECT, // OFFSET,APOST,OPTIMIZE',REGION=4096K //STEPLIB DD DSNAME=PM7351.TEST2.COB,DISP=SHR //SYSIN DD DSNAME=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT2 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT3 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT4 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT5 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT6 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT7 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSPRINT DD SYSOUT=* //SYSLIN DD DSNAME=&&LOAD,DISP=(MOD,PASS),UNIT=SYSDA, // SPACE=(10,(10,10)),DCB=BLKSIZE=400 //LKED EXEC PGM=IEWL,REGION=1024K //SYSPRINT DD SYSOUT=A //SYSLIB DD DSN=PM7351.TEST2.LOADLIB,DISP=SHR // DD DSN=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSLMOD DD DSN=PM7351.TEST2.LOADLIB, // DISP=SHR //SYSUT1 DD UNIT=SYSDA,DCB=BLKSIZE=1024,SPACE=(CYL,(1,1)) //SYSTERM DD SYSOUT=* //SYSLIN DD DSN=&&LOAD,DISP=(OLD,DELETE) //SYSIN DD DUMMY i am getting IEW2013I 0F08 NO MEMBER NAME WAS SPECIFIED. MODULE WAS SAVED USING TEMPNAM1. could any one tell me the resolution for this..?

1 Answers  


Categories