0

mainframe Online Quiz - 145

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

How can return codes be tested before execution of a job step?

  1. Through the RC keyword

  2. Through the CODE keyword

  3. Through the COND keyword

  4. Through the RETURNCD keyword


Correct Option: C
  1. Overriding or adding procedures

  2. Logically connecting input datasets

  3. Overriding a called PROC dsname

  4. All of the above


Correct Option: B

How can values be passed from the job stream to an executable program?

  1. Through the PARM keyword

  2. Through the VALUE parameter

  3. Through the PGM parameter

  4. All of the above


Correct Option: A

Must tape dataset definitions include VOL=SER specifications?

  1. Yes

  2. No

  3. Only for uncataloged datasets

  4. Only for cataloged datasets


Correct Option: C

What is the length of DFHCOMMAREA

  1. 16Kb

  2. 32Kb

  3. 64Kb

  4. 1 MB


Correct Option: B

by which command we switch amoung messages?

  1. CEMT

  2. CEBR

  3. CMSG

  4. CECKI


Correct Option: C

how we position the cursor in a cics pogrem statically

  1. send map() cursor()

  2. cursor()

  3. send ()

  4. none of the above


Correct Option: A

How many bytes will a S9(8) COMP field occupy ?

  1. 9

  2. 4

  3. 8

  4. 5


Correct Option: B

AI Explanation

To answer this question, we need to understand the concept of the COMP field in COBOL.

In COBOL, the COMP field is used to represent numeric data. It is stored in binary format, which means that each digit is represented by a binary byte.

The S9(8) COMP field is defined as a signed numeric field with a length of 8 digits. The "S9" part indicates that it is a signed field, and the "(8)" part indicates the length.

Since each digit is represented by a binary byte, the S9(8) COMP field will occupy 8 bytes.

Therefore, the correct answer is B) 4.

How many bytes does a S9(7) COMP-3 field occupy

  1. 4

  2. 8

  3. 3

  4. 7


Correct Option: B

How many bytes does a S9(7) COMP-3 field occupy

  1. 4

  2. 8

  3. 3

  4. 7


Correct Option: A

AI Explanation

To answer this question, we need to understand the representation of a COMP-3 field in COBOL.

A S9(7) COMP-3 field is a signed numeric field that can hold up to 7 digits. It is stored in a packed decimal format, where each digit is represented by half a byte (nibble). The left-most nibble is used to store the sign of the number.

In a COMP-3 field, each digit occupies 4 bits (half a byte). Therefore, for a S9(7) COMP-3 field, we have 7 digits, which requires 7*4 = 28 bits.

Since 8 bits make up 1 byte, we need to divide 28 bits by 8 to get the number of bytes required.

28 bits / 8 = 3.5 bytes

Since we cannot have half a byte, we need to round up to the nearest whole number. Therefore, a S9(7) COMP-3 field occupies 4 bytes.

So, the correct answer is A) 4 bytes.

How many bytes does a S9(7) SIGN TRAILING SEPARATE field occupy ?

  1. 7

  2. 8

  3. 9

  4. 4


Correct Option: B

What is the maximum value that can be stored in S9(8) COMP?

  1. 999999999

  2. 9999999

  3. 99999999

  4. 99999


Correct Option: C
Explanation:

To solve this question, the user needs to know the format and properties of a S9(8) COMP data type in mainframe systems.

The S9(8) COMP is a signed 4-byte (32-bit) binary integer data type in IBM mainframe systems. It can store values ranging from -2147483648 to 2147483647. Since S9(8) is a signed data type, the first bit of the binary representation is reserved for the sign of the number (0 for positive and 1 for negative).

To find the maximum value that can be stored in S9(8) COMP, we can use the formula:

Maximum value = (2^(number of bits - 1)) - 1

For S9(8) COMP, the number of bits is 32 (4 bytes x 8 bits per byte), so the formula becomes:

Maximum value = (2^(32 - 1)) - 1

Maximum value = 2,147,483,647

However, since S9(8) COMP is a signed data type, the maximum positive value that can be stored is half of the range, or 2,147,483,647 / 2 = 1,073,741,823.

Now, let's go through each option and explain why it is right or wrong:

A. 999999999: This option is incorrect because the maximum positive value that can be stored in S9(8) COMP is 1,073,741,823, which is less than 999,999,999.

B. 9999999: This option is incorrect because it is less than the maximum positive value that can be stored in S9(8) COMP, which is 1,073,741,823.

C. 99999999: This option is incorrect because it is greater than the maximum positive value that can be stored in S9(8) COMP, which is 1,073,741,823.

D. 99999: This option is incorrect because it is much less than the maximum positive value that can be stored in S9(8) COMP, which is 1,073,741,823.

Therefore, the correct answer is:

The Answer is: C. 99999999

05 FIELDA PIC XXXX VALUE 'ABCb'. 05 FIELDB PIC XXXX VALUE SPACES. .... MOVE FUNCTION REVERSE(FIELDA) TO FIELDB. Which one of the following is the content of FIELDB following execution of the MOVE statement shown in the sample code above?

  1. bABC

  2. bCBA

  3. bcba

  4. ABbC

  5. ABCb


Correct Option: A

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

Sample Code 0100 IDENTIFICATION DIVISION. 0200 PROGRAM-ID. AM822P115. Referring to the sample code above, which one of the following statements is correct?

  1. There should not be a hyphen between PROGRAM and ID.

  2. Line 0100 should be DIVISION-ID.

  3. The compiler shortened the program name to "AM822P11".

  4. Line 0200 should be PROGRAM IDENTIFICATION. AM822P115.

  5. The program name must not contain numbers.


Correct Option: C

Table Definition Sample data shown below. 100 entries maximum. Data is ordered by item. Limit table size to actual data. Item Price D00025A 23.50 D00025B 29.50 D00025C 33.99 D00026A 11.20 Which one of the following is the proper COBOL description for the above table definition?

  1. 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS 1 TO 100 TIMES ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.

  2. 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS UP TO 100 TIMES DEPENDING ON WS-ITEM-COUNT ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.

  3. 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS 1 TO 100 TIMES DEPENDING ON WS-ITEM-COUNT ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.

  4. 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS UP TO 100 TIMES DEPENDING ON WS-ITEM-COUNT AND KEY ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.


Correct Option: C

Sample code WORKING-STORAGE SECTION. 01 WORK-TABLE. 05 WK-ALPHA PIC A(2) VALUE 'AB'. 05 FILLER PIC X VALUE ''. 05 WK-ALPHANUM PIC X(4) VALUE 'CDEF'. 05 PIC X VALUE ''. 05 WK-NUM PIC 999. 05 PIC X VALUE '*'. PROCEDURE DIVISION. .... INITIALIZE WORK-TABLE. After execution of the statement in the sample code above, which one of the following values does WORK-TABLE contain? NOTE: b = BLANK or UNPRINTABLE HEXADECIMAL character

  1. bb*bbbb*bb0*

  2. AB*CDEF*bb0*

  3. ABbCDEFb000b

  4. bb*bbbb*000*


Correct Option: D
- Hide questions