consider the following two IF statements:
IF X AND NOT Y MOVE A TO B
IF Z=1 OR 9 MOVE A TO B
select one of the following data divusion entries which
gives identical
results for both the above IF statements
a.01 Z PIC 9
88 X VALUE 1.9
88 Y VALUE 0.2 THRU 8
b.01 Z PIC 9
88 X VALUE 0.2 THRU 8
Y VALUE 1.9
c.01 Z PIC 9
88 X VALUE 1.9
88 NOT-Y VALUE 0.2 THRU 1.9
d.none of yhe above

Answers were Sorted based on User's Feedback



consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B ..

Answer / rama krishna

d

Is This Answer Correct ?    1 Yes 0 No

consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B ..

Answer / ram g [mindt tree]

z should be initialized else it will consider as spaces and
pgm trying to store numeric will result in soc7 abend.
set command should used to fix the value for z.
can say..answer is d.

Is This Answer Correct ?    0 Yes 0 No

consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B ..

Answer / dimpy19

there should not be any PIC clause defination on 01 level
01 Z PIC 9

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

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

2 Answers  


What is Control Break processing ?

1 Answers   iGate,


What is the maximum data length for Numeric DataType ?

3 Answers   Cap Gemini,


What rules are followed by the search verb.

0 Answers  


How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(20) value " cobol language". 01 data-name-2 PIC x(20). MOVE data-name-1 to data-name-2. would like the value of data-name-2 is "cobol language".

3 Answers  






how you will define variables length in cobol.

3 Answers   Temenos,


Are you comfortable in cobol or jcl?

0 Answers  


There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.

1 Answers   Mind Tree,


01 b pic +9(4) How many bytes it will take for storage???

2 Answers  


What are the pertinent COBOL

0 Answers   IBM,


if someone is using my file,how can i find which user id is using?

4 Answers  


HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


Categories