0

mainframe Online Quiz - 91

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

Data in IDENTIFICATION-TABLE IDENT-ID IDENT-NAME IDENT-AGE ----------------------------- 1234 AAAA 23 1234 ABCD 22 2345 ACDB 13 3456 ADSB 25 4567 DADS 15 5678 EDSC 20 FIND IDENTIFICATION-TABLE WITH IDENT-ID EQ '1234' DISPLAY IDENT-ID IDENT-NAME IDENT-AGE LOOP How many records will be displayed?

  1. 0

  2. 1

  3. 2

  4. 3


Correct Option: C

Data in IDENTIFICATION-TABLE IDENT-ID IDENT-NAME IDENT-AGE ----------------------------- 1234 AAAA 23 1234 ABCD 22 2345 ACDB 13 3456 ADSB 25 4567 DADS 15 5678 EDSC 20 FIND IDENTIFICATION-TABLE WITH SUPER-ID-NAME-AGE EQ '1234' DISPLAY IDENT-ID IDENT-NAME IDENT-AGE LOOP How many records will be displayed?

  1. 0

  2. 1

  3. 2

  4. 3


Correct Option: A

If a find statement returns with multiple records for a given descriptor value, in which order the records will be displayed in the output?

  1. ISN

  2. RABN

  3. Physically stored order

  4. Random


Correct Option: A

Indicate which of the following statements describe Bachman diagram

  1. Required for effective use of DML statements

  2. Used to help define the schema

  3. Shows area relationships

  4. Identifies the set name


Correct Option: A,D

What are the types of VSAM files that COBOL can handle?

  1. KSDS, ESDS

  2. ESDS, RRDS

  3. KSDS, ESDS, RRDS

  4. KSDS, RRDS


Correct Option: C

The file access methods in COBOL are: INPUT and OUTPUT only.

  1. True

  2. False


Correct Option: A

RECORDING MODE FOR QSAM files can be:

  1. F, V

  2. U, S

  3. F, R

  4. F, V, U, R


Correct Option: A,B

Which COBOL division(s) is(are) mandatory in a COBOL program?

  1. Identification Division

  2. Environment Division

  3. Data Division

  4. Procedure Division


Correct Option: A

Internal storage used to store S9(n) COMP-3 variable is ____ bytes.

  1. n+1

  2. (n+1)/2

  3. (n+1)/3

  4. n/2+1


Correct Option: D

AI Explanation

To answer this question, you need to understand how the COMP-3 data type is stored in internal storage.

The COMP-3 (also known as packed decimal) data type is commonly used in COBOL programming to represent numeric values. It is stored in a binary-coded decimal (BCD) format, where each digit is represented by a 4-bit binary number.

For a COMP-3 variable S9(n), the "S" indicates a signed value (positive or negative), and "n" represents the total number of digits in the variable.

To store a COMP-3 variable in internal storage, each digit is packed into a 4-bit BCD representation. However, each byte can only store two packed digits. Therefore, the number of bytes required to store a COMP-3 variable can be calculated as (n/2) + 1.

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

Option A) n+1 - This option is incorrect because it does not take into account the fact that each byte can store two packed digits.

Option B) (n+1)/2 - This option is incorrect because it does not correctly account for the fact that each byte can store two packed digits.

Option C) (n+1)/3 - This option is incorrect because it assumes that each byte can store three packed digits, which is not the case.

Option D) n/2+1 - This option is correct because it correctly accounts for the fact that each byte can store two packed digits.

Therefore, the correct answer is D. The internal storage used to store S9(n) COMP-3 variable is n/2+1 bytes.

Indexes can be used as subscripts while subscripts cannot be used as indexes.

  1. True

  2. False


Correct Option: A

The collating sequence can be controlled in VALUE...THRU clause either in ascending or descending order.

  1. True

  2. False


Correct Option: A

Computational fields defined with COMP picture clause cannot be reference modified.

  1. True

  2. False


Correct Option: B

BLANK WHEN ZERO must not be specified for 66 or 88 level variables or signed fields.

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, we need to understand the concept of "BLANK WHEN ZERO" and its application to level variables and signed fields.

In COBOL, "BLANK WHEN ZERO" is a clause that can be used with numeric fields to specify that the field should be displayed as blank if its value is zero. This clause is typically used for output formatting purposes.

However, the "BLANK WHEN ZERO" clause should not be specified for level 66 or 88 variables or signed fields.

Level 66 and 88 are special levels in COBOL that are used for condition names. Level 66 variables are used for boolean conditions, while level 88 variables are used for condition names that represent multiple values. These variables are typically used for conditional statements and comparisons.

Since level 66 and 88 variables are not intended for output formatting, the "BLANK WHEN ZERO" clause should not be specified for them.

Therefore, the correct answer is:

Option A) True - This option is correct because "BLANK WHEN ZERO" must not be specified for 66 or 88 level variables or signed fields.

JUSTIFIED clause cannot be used for data items defined with USAGE IS POINTER.

  1. True

  2. False


Correct Option: A

EJECT is used for creating a new page in the compiler listing.

  1. True

  2. False


Correct Option: A

For successful execution of REWRITE stmt, the direct access file must be opened in _____ mode.

  1. I

  2. O

  3. I-O

  4. O-I


Correct Option: C

ASCENDING/DESCENDING KEY data item cannot be floating point items.

  1. True

  2. False


Correct Option: A

The SYNCHRONIZED LEFT / RIGHT clause which specifies alignment of elementary data item on storage boundary can be specified for data items defined with USAGE IS INDEX.

  1. True

  2. False


Correct Option: A

The maximum size of a Tablespace can be

  1. 64 Gb

  2. 32 Gb

  3. 8 Kb

  4. 4 Kb


Correct Option: A

Which one is not a pre-compile parameter

  1. Level

  2. Host()

  3. APost

  4. Time


Correct Option: D
- Hide questions