Tag: mainframe

Questions Related to mainframe

  1. REPEAT 6 TIMES instruction END-REPEAT

  2. MOVE 1 TO COUNTER PERFORM UNTIL COUNTER = 6 COMPUTE COUNTER = COUNTER + 1 instruction END-PERFORM

  3. PERFORM 6 TIMES instruction END-PERFORM

  4. REPEAT VARYING COUNTER FROM 1 BY 1 UNTIL COUNTER = 6 instruction END-PERFORM


Correct Option: C

Which of the following variable names for data items are not syntactically correct?

  1. CIBER-CITY

  2. -NW-OF-FOOD

  3. TOTAL-NO-OF-LINES-PER-PAGE

  4. PHONE NUMBER

  5. INDEX


Correct Option: B,D,E

AI Explanation

To determine which of the following variable names for data items are not syntactically correct, let's go through each option:

A. CIBER-CITY - This option is syntactically correct. Variable names can contain letters, numbers, and underscores, but cannot start with a number.

B. -NW-OF-FOOD - This option is not syntactically correct. Variable names cannot start with a hyphen or any special characters.

C. TOTAL-NO-OF-LINES-PER-PAGE - This option is syntactically correct. Variable names can contain underscores to separate words.

D. PHONE NUMBER - This option is not syntactically correct. Variable names cannot contain whitespace or spaces.

E. INDEX - This option is syntactically correct. Variable names can be single words and can contain letters, numbers, and underscores.

Therefore, the variable names that are not syntactically correct are B. -NW-OF-FOOD, D. PHONE NUMBER, and E. INDEX.

  1. after each 01 level of a variable declaration

  2. at the end of each instruction

  3. at the end of each paragraph

  4. at the end of the program

  5. to end an IF instruction


Correct Option: A,C,D