Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries given below: 01 END-OF-FILE-SWITCH PIC XXX. 88 NO-MORE-RECS VALUE "YES". 88 MORE-RECS VALUE "NO". (i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS. (ii) IF NO-MORE-RECS = "YES" GO TO LAST-PARA. (iii) IF NO-MORE-RECS GO TO LAST-PARA. Which are wrong? (a) (i) and (ii) (b) (ii) and (iii) (c) (i) and (iii) (d) all

This question is related to TCS Interview

Showing Answers 1 - 6 of 6 Answers

Karunagaran Molliya Gounder

  • Dec 16th, 2006
 

answer is a) (i) and (ii)

Answer is (a)

Clarification :

(i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS.

In the above statement, We can't move any information  to  88 Level (This is Conditional Name ) Data Item.  We can move "YES" to END-OF-FILE-SWITCH.

Hence, (i) is wrong.

(ii) IF NO-MORE-RECS = " YES"  GO TO LAST-PARA.

In the above Statement, NO-MORE-RECS IS under 88 Level Condition Name )

    The above (ii) statement Correctly in the following ways :
     if END-OF-FILE-SWITH = "YES"  GO TO LAST-PARA
      OR 
     IF NO-MORE-RECS GO TO LAST-PARA.

Hence (ii) is wrong.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions