Tag: mainframe

Questions Related to mainframe

How many bytes will be used to store data internally for a variable defined as PIC S9(8)V99 Comp-3?

  1. 10

  2. 6

  3. 5

  4. 11


Correct Option: B

MAIN-PARA. MOVE 10 TO WS-CTR PERFORM PARA-1 WS-CTR TIMES END-PERFORM. PARA-1. MOVE 20 TO WS-CTR. How many times the PARA-1 will be performed when the above code is executed?

  1. 10

  2. 20

  3. 1

  4. None


Correct Option: A

Can we redefine an existing X(100) field with a new field of X(200)?

  1. Yes

  2. No

  3. None of the above

  4. All of the above


Correct Option: A

AI Explanation

To answer this question, we need to understand the concept of redefining fields in programming.

In programming, fields are variables or data structures that hold values. They are defined with a specific data type and size.

When it comes to redefining an existing field, it depends on the programming language and the specific situation. However, in general, it is possible to redefine an existing field with a new field of a different size.

In this case, the question asks if we can redefine an existing X(100) field with a new field of X(200). The correct answer is A) Yes. This means that it is possible to redefine an existing field with a larger size, in this case, going from X(100) to X(200).

It is important to note that when redefining fields, you should consider the impact on the program and any potential issues that may arise from changing the size of the field.

What is the maximum length that can be defined for a Numeric field?

  1. 36

  2. 18

  3. 32000

  4. No Limit


Correct Option: B
  1. Contents of A will be moved to B

  2. Contents of B will be moved to A

  3. Statement will give an error

  4. None


Correct Option: B

DISPLAY 'This is COBOL Test' The above statement is coded in a COBOL program. Where will the text be displayed, when this program is executed?

  1. The media/resource that is assigned to SYSPRINT DD name in JCL

  2. The media/resource that is assigned to SYSOUT DD name in JCL

  3. Always prints on Spool Screen

  4. Always prints on Printer


Correct Option: B