0

mainframe Online Quiz - 111

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

What will happen when a file that doesnt exist is opened in I-O mode?

  1. The file will be created and will be opened for reading and writing

  2. The open fails and error occurs

  3. File will be created and opened for writing only

  4. The file will be created and opened for reading only


Correct Option: B

What is an 88 level used for in COBOL?

  1. Elementary level

  2. For condition names

  3. Initialize

  4. Renames


Correct Option: B

AI Explanation

To answer this question, you need to understand the structure and syntax of COBOL programming language.

In COBOL, the level number is used to define the level of a data item. The level number indicates the hierarchy or nesting level of the data item within the program's data structure.

The correct answer is B) For condition names.

In COBOL, level 88 is used to define condition names. Condition names are used to represent conditions or states in the program. They are typically used in conjunction with the "IF" statement to test for a specific condition and execute certain logic based on the result.

For example, let's say you have a condition name called "INVALID-AGE" defined at the 88 level. You can then use this condition name in an "IF" statement to test if the age entered is invalid:

01 AGE PIC 9(2).
88 INVALID-AGE VALUE 0 THRU 17.

IF AGE IS INVALID-AGE
  DISPLAY "Invalid age entered."
ELSE
  DISPLAY "Valid age entered."
END-IF.

In this example, if the age entered is between 0 and 17 (inclusive), the condition "INVALID-AGE" will be true, and the message "Invalid age entered." will be displayed. Otherwise, the message "Valid age entered." will be displayed.

Therefore, the correct answer is B) For condition names.

What happens when the access mode of an indexed file is DYNAMIC?

  1. The records will be accessed one after the other in order of primary key

  2. The file will be accessed one record at a time and for each access an exact value for the primary key will be specified

  3. Both 1 and 2

  4. None of the above


Correct Option: C

What is the number of characters in COBOL-85 character set?

  1. 51

  2. 52

  3. 53

  4. 54


Correct Option: B

What is the name of the area from character positions 73 to 80?

  1. Area C

  2. Area AB

  3. Identification area

  4. Modification area


Correct Option: C

What does a disposition of (MOD,KEEP,) mean?

  1. Dataset is created if not available

  2. Dataset will deleted on abnormal termination

  3. Dataset will not be deleted on abnormal termination

  4. job will abend if the data is not available


Correct Option: A,C
Explanation:

To understand what a disposition of (MOD,KEEP,) means, the user needs to know about dataset dispositions in mainframe systems.

A dataset disposition is a set of instructions that specifies what should happen to a dataset after a job completes. It can include options such as KEEP, CATLG, or DELETE, which determine whether a dataset should be retained or deleted and whether a catalog entry should be created.

In this case, the disposition of (MOD,KEEP,) means that the dataset should be opened for output in "modify" mode (MOD), which allows existing data to be updated or added to, and should be kept (KEEP) after the job completes, regardless of whether the job ends normally or abnormally.

Now, let's review each option and determine which one is correct:

A. Dataset is created if not available: This option is incorrect because the disposition of (MOD,KEEP,) assumes that the dataset already exists and is being modified. It does not involve creating a new dataset.

B. Dataset will deleted on abnormal termination: This option is incorrect because the disposition of (MOD,KEEP,) explicitly specifies that the dataset should be kept regardless of whether the job ends normally or abnormally.

C. Dataset will not be deleted on abnormal termination: This option is correct. The disposition of (MOD,KEEP,) specifies that the dataset should be kept after the job completes, even if the job ends abnormally.

D. job will abend if the data is not available: This option is incorrect because the disposition of (MOD,KEEP,) assumes that the dataset already exists and is being modified. It does not involve checking for the availability of the dataset.

Therefore, the correct answer is:

The Answer is: C. Dataset will not be deleted on abnormal termination.

Temporary datasets are created by

  1. DSN=*

  2. DSN=##TEMP

  3. DSN=&&TEMP

  4. By not specifying any DSNAME


Correct Option: C,D

What is COND=EVEN ?

  1. Execute next step even if the current step terminates abnormally.

  2. Execute this step even if any of the previous steps, terminated abnormally.

  3. Execute next step even if the current step terminates normally.

  4. Execute this step even if any of the previous steps, terminated normally.


Correct Option: B

What is COND=ONLY ?

  1. Execute this step only if any of the previous steps terminates normally

  2. Execute this step only if any of the previous steps terminates abnormally

  3. Execute next step only this step terminates abnormally

  4. Execute next step only this step terminates normally


Correct Option: B

What happens if both JOBLIB & STEPLIB is specified ?

  1. STEPLIB will be ignored

  2. JOBLIB will be ignored

  3. Both are referred

  4. JOBLIB overrides the STEPLIB


Correct Option: B

The DISP in the JCL is MOD, the dataset is already available and the program opens the file in OUTPUT mode. What happens ?

  1. Records will be appended at the end

  2. Records will be overwritten

  3. Dataset will be deleted and records will be written by creating a new file

  4. Job will abend


Correct Option: A

Maximum number of steps in a job

  1. 16

  2. 255

  3. 256

  4. No limit


Correct Option: B

AI Explanation

To answer this question, we need to understand the concept of the maximum number of steps in a job.

In computing, a "job" refers to a task or a program that is being executed by a computer system. Each job can be divided into a series of steps or instructions that the computer follows to complete the task. The maximum number of steps in a job is determined by the computer system's architecture and limitations.

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

Option A) 16 - This option is incorrect because 16 is a relatively low number and may not be sufficient for many complex tasks.

Option B) 255 - This option is correct because 255 represents the maximum value that can be stored in an 8-bit binary number (2^8 - 1). In some computer systems, the maximum number of steps in a job is limited to 255 instructions.

Option C) 256 - This option is incorrect because 256 exceeds the maximum value that can be stored in an 8-bit binary number. Additionally, having 256 steps in a job would require a larger memory capacity and may not be supported by all computer systems.

Option D) No limit - This option is incorrect because there is typically a limit to the number of steps in a job. Computer systems have finite resources and limitations that restrict the maximum number of instructions that can be executed in a single job.

The correct answer is B) 255. This option is correct because it represents the maximum number of steps that can be executed in a job in some computer systems.

Which of the following DB2 data types CANNOT be used to contain the date an employee was hired?

  1. TIMESTAMP

  2. VARCHAR

  3. TIME

  4. CLOB


Correct Option: C

Which of the following is defined on the dependent table to implement a referential constraint?

  1. Primary Key

  2. Check constraint

  3. Foreign Key

  4. Update trigger


Correct Option: C
  1. NEWTAB would have the same column names, attributes and referntial integrity as TAB.

  2. NEWTAB would have the same column names and attributes as TAB.

  3. NEWTAB would have the same column names, attributes, indexes and constraints as TAB.

  4. NEWTAB would have the same column names, attributes and data as TAB.


Correct Option: B

Which of the following occurs if an application ends abnormally during an active unit of work?

  1. The unit of work moves to pending status

  2. The unit of work moves to CHECK_PENDING

  3. The unit of work is rolled back

  4. The unit of work remains active


Correct Option: C

Given the table: COUNTRY NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1

  2. ORDER BY 2 ASC, 1 ASC

  3. ORDER BY 1,2

  4. ORDER BY 1 ASC, 2 ASC


Correct Option: C,D

Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1

  2. ORDER BY 2 ASC, 1 ASC

  3. ORDER BY 1,2

  4. ORDER BY 1 ASC, 2 ASC


Correct Option: C,D

Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1

  2. ORDER BY 2 ASC, 1 ASC

  3. ORDER BY 1,2

  4. ORDER BY 1 ASC, 2 ASC


Correct Option: C,D

Use OCCURS clause at 01 level

  1. True

  2. False


Correct Option: B
- Hide questions