Sample Code Field in working storage: 05 S-EOF-CHECK PIC X(01). 88 S-NOT-END-OF-FILE VALUE 'N'. 88 S-END-OF-FILE VALUE 'Y'. MAINLINE. SET S-END-OF-FILE TO TRUE PERFORM A0100-PRINT-DETAIL-AND-FOOTERS UNTIL S-END-OF-FILE END-PERFORM. Using the sample working storage and mainline section of a program, which one of the following is the coding error that occurred in the sample above?

  1. A READ statement is missing in the MAINLINE section after the PERFORM.

  2. MAINLINE must not contain any statements other than the PERFORM statement.

  3. S-EOF-CHECK is not properly initialized prior to the PERFORM statement

  4. The line "SET S-END-OF-FILE TO TRUE" is not a valid statement.

  5. In working storage, an 88 level must be defined for values of S-EOF-CHECK other than 'N' and 'Y'.


Correct Option: C

Find more quizzes: