Tag: mainframe

Questions Related to mainframe

  1. Just go with normal delete process it will go fine.

  2. Can delete only if the record is obtained by a random read.

  3. Are you nuts? How can you delete a record from a ESDS file?

  4. Using SORT utility


Correct Option: C

OCCURS clause cannot be used in 01 Level

  1. Occurs clause in 01 cant be done because 01 is the top most level.

  2. Who said so, you can use it, I bet!

  3. Occurs clause is there to repeat fields with same format, not the records.

  4. Stack will over flow.


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of the OCCURS clause in COBOL.

The OCCURS clause is used to define a table or array in COBOL. It specifies the number of occurrences of a field or group of fields within the table or array. The OCCURS clause can only be used with elementary data items (such as numeric or alphanumeric fields) and cannot be used with group items or record descriptions.

Option A) Occurs clause in 01 can't be done because 01 is the topmost level - This option is incorrect because the OCCURS clause can be used with elementary data items at the 01 level or any other level within the record description.

Option B) Who said so, you can use it, I bet! - This option is incorrect because it does not provide any explanation or reasoning.

Option C) Occurs clause is there to repeat fields with the same format, not the records - This option is correct. The OCCURS clause is used to repeat fields with the same format within a table or array. It does not repeat entire records.

Option D) Stack will overflow - This option is incorrect because it does not relate to the use of the OCCURS clause in COBOL.

The correct answer is C) Occurs clause is there to repeat fields with the same format, not the records. This option is correct because it accurately explains the purpose and usage of the OCCURS clause in COBOL.

  1. Does Nothing!

  2. Terminates the program.

  3. Terminates the paragraph.

  4. Terminates the loop.


Correct Option: A
  1. Unlimited

  2. 255

  3. 125

  4. Limited to business requirement


Correct Option: B
  1. What's the problem in it? Will go fine!

  2. Program goes in infinite loop.

  3. Program will not execute.

  4. Compiler throws error.


Correct Option: B
  1. DEFINE WS-VAR PIC(9) COMP-1

  2. 01 WS-VAR PIC(9) COMP-1

  3. 01 WS-VAR USAGE COMP-1

  4. Author should learn COBOL


Correct Option: C
  1. ALPHABETIC, ALPHANUMERIC

  2. ALPHABETIC, ALPHANUMERIC, NUMERIC

  3. ALPHABETIC, NUMERIC

  4. ALPHANUMERIC, NUMERIC


Correct Option: A
  1. Yes

  2. No

  3. X(245) can be refined to X(250)

  4. Author should learn COBOL


Correct Option: A
  1. INPUT

  2. I-O, OUTPUT

  3. I-O, OUTPUT, EXTEND

  4. OUTPUT, EXTEND


Correct Option: D