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

How to Pass table from a cobol program to another cobol program and how to use that table in called program

8 Answers   Patni, SunGard,


what are the limitations of Inline Perform?

3 Answers   Zensar,


what is meant by binary search?

4 Answers  


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

1 Answers  


Can we move X(7) to S9(7) COMP?

1 Answers  






Can a Search can be done on a table with or without Index?

0 Answers  


How do get the result of your program directly on your pc?

0 Answers   UST,


study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid

4 Answers   TCS,


how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please

2 Answers  


How to increase the logical record length of existing PS file?

7 Answers  


what will happen if i give program name and member name as different? program runs successful or w'll abend?

5 Answers   CTS,


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


Categories