0

mainframe Online Quiz - 13

Description: mainframe Online Quiz - 13
Number of Questions: 20
Created by:
Tags: mainframe
Attempted 0/20 Correct 0 Score 0

In what mode the file should be OPENed to Rewrite/ Delete records in a File?

  1. OUTPUT

  2. EXTEND

  3. I-O

  4. INPUT


Correct Option: C

RESULT = 0 PERFORM VARYING C FROM 1 BY 1 UNTIL C = 6 COMPUTE RESULT = RESULT + 1 END-PERFORM What is the content of RESULT, after completion of above statements?

  1. 4

  2. 5

  3. 6

  4. 1


Correct Option: B

In a COBOL program, the following statements are coded: CALL 'PROGRAMB' USING A, B, C END-CALL. What is the significance of the END-CALL in the above CALL Statement?

  1. All the woking staorage variables in ProgramB will be initialized when the Program B execution is completed.

  2. Nothing will happen. It is just coded to indicate the end of CALL statement.

  3. Areas A, B and C will be initialized when the Program B execution is completed.

  4. None of the above


Correct Option: A

A COBOL Program (Program A) calls Program B. What will happen, If STOP RUN is issued at the end of Program B?

  1. The Control will come back to Program A.

  2. The control will NOT come back to Program A and Program B will terminates immediately at the STOP RUN Statement.

  3. Program B abends abnormally.

  4. Infinite Loop


Correct Option: B

What abend will be hit when a COBOL program is trying to move Alphabetic Data into Numeric fields?

  1. S0C1

  2. S0C4

  3. S0C7

  4. S0CB


Correct Option: C

Can we execute a COBOL program both from an Online Program (CICS) and Batch Program (JOB)?

  1. Yes, Always Possible

  2. Yes, Only when the COBOL program contains CICS and Batch common verbs/statements

  3. No. Never Possible

  4. None of the above


Correct Option: B

How many Bytes will be assigned for a field which is defined with S9(6) COMP usage?

  1. 2

  2. 4

  3. 6

  4. 8


Correct Option: B

How many bytes will be assigned to a field which is defined with USAGE POINTER?

  1. 4

  2. 6

  3. 8

  4. 10


Correct Option: A

we can display the index variable like normal cobol variable

  1. True

  2. False


Correct Option: B

we will do the operations on the index variable using:

  1. PERFORM

  2. MOVE

  3. SEARCH

  4. SET


Correct Option: A,C,D

INITIALIZE statement cannot load a variable-length table (one that was defined using OCCURS DEPENDING ON)

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, we need to understand the purpose and limitations of the INITIALIZE statement in COBOL.

The INITIALIZE statement is used to initialize data items to their default values. It can be used with elementary data items and fixed-length tables, but it cannot be used with variable-length tables that are defined using the OCCURS DEPENDING ON clause.

The OCCURS DEPENDING ON clause allows the size of a table to be determined dynamically at runtime. The size of the table is based on the value of a preceding integer data item. Since the size of the table is not known until runtime, it cannot be initialized using the INITIALIZE statement.

Therefore, the statement "INITIALIZE statement cannot load a variable-length table (one that was defined using OCCURS DEPENDING ON)" is true.

Let's go through each option to understand why it is correct or incorrect:

Option A) True - This option is correct because the INITIALIZE statement cannot be used to load a variable-length table defined using OCCURS DEPENDING ON.

Option B) False - This option is incorrect because the INITIALIZE statement cannot load a variable-length table.

The correct answer is A) True. This option is correct because the INITIALIZE statement cannot be used with variable-length tables defined using OCCURS DEPENDING ON.

STOP RUN statement closes all files defined in any of the programs

  1. True

  2. False


Correct Option: A

If STOP RUN is not coded in the program,

  1. Abend with S806

  2. Abend with U4095

  3. Abend with U4038

  4. Abend with S322


Correct Option: C
  1. 0

  2. +1

  3. -1

  4. None of the Above


Correct Option: B

Which of the following is not a modal command?

  1. a) IF

  2. b) THEN

  3. c) DO

  4. d) GOTO


Correct Option: D

Condiser the following statements REPRO can be used for X) Copy one flat to other flat file Y) Copy one PDS(all the members) to other PDS Z) Copy only one member from one PDS to other PDS

  1. a) All 3 statements are TRUE

  2. b) X and Y are TRUE

  3. c) X and Z are TRUE

  4. d) Y and Z are FALSE


Correct Option: B

Which VSAM clusters support only fixed length records?

  1. a) LDS

  2. b) RRDS

  3. c) ESDS

  4. d) KSDS


Correct Option: B

What is the DD statement for a output file?

  1. Code the DSN as PDS (member) with a DISP = OLD

  2. Code the DSN as PDS (member) with a DISP = SHR

  3. Code the DSN as PDS (member) with a DISP = NEW

  4. Code the DSN as PDS (member) with a DISP = MOD


Correct Option: C

What is S322 abend

  1. a) Indicates a space abend

  2. b) Indicates a regione abend

  3. c) Indicates a time out abend

  4. d) a and c


Correct Option: C
- Hide questions