0

programming languages Online Quiz - 245

Description: programming languages Online Quiz - 245
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

A DD statement has 2 types of parameters. Name them?

  1. Positional, Keyword

  2. Keyword, Control

  3. Dynamic, Static

  4. Named, Dynamic

  5. None of the above


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of DD statements in computer programming or job control language (JCL).

A DD statement (or Data Definition statement) is used in JCL to define input and output datasets for a job. It consists of various parameters that specify the characteristics of the dataset.

The two types of parameters in a DD statement are:

  1. Positional Parameters: These parameters are specified in a fixed order and their values are assigned based on their position in the statement. The order of the positional parameters is predefined and must be followed. Examples of positional parameters in a DD statement include the dataset name, the type of dataset (e.g., PS for a physical sequential dataset), and the DCB (Data Control Block) parameters.

  2. Keyword Parameters: These parameters are specified by using a keyword followed by an equal sign (=) and a value. They are not position-dependent and can be specified in any order. Keyword parameters provide flexibility in specifying the characteristics of the dataset. Examples of keyword parameters in a DD statement include SPACE (to specify the amount of space allocated for the dataset), UNIT (to specify the device on which the dataset resides), and DISP (to specify the disposition of the dataset after job completion).

Based on the above explanation, the correct answer is:

A) Positional, Keyword - This option is correct because DD statements have both positional and keyword parameters. Positional parameters are specified in a fixed order, while keyword parameters are specified using keywords followed by values.

Therefore, the correct answer is A) Positional, Keyword.

Which of these units are used to allocate space?

  1. Cylinders

  2. Tracks

  3. Blocks

  4. All of the above

  5. None of the above


Correct Option: D

Which of the following is used to copy partitioned datasets?

  1. IEFBR14

  2. IEBCOPY

  3. IEBGENER

  4. IEBCOMPR

  5. None of the above


Correct Option: B

Inorder to not execute a step in the job after a return code of 8 in step1, what the step2 EXEC statement include?

  1. COND = (8,NE)

  2. COND = (8,GE)

  3. COND = (8,EQ)

  4. A & b

  5. B & c


Correct Option: E

What is used to pass data from the JCL to COBOL programs?

  1. PROC

  2. PARM

  3. SYSIN

  4. Instream data


Correct Option: B

AI Explanation

To pass data from the JCL (Job Control Language) to COBOL programs, the PARM parameter is used.

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

Option A) PROC - The PROC statement is used to define a procedure or a set of JCL statements that can be reused. It is not specifically used to pass data from JCL to COBOL programs.

Option B) PARM - The PARM parameter is used to pass data from the JCL to COBOL programs. It allows you to pass input parameters or arguments to a COBOL program during execution.

Option C) SYSIN - The SYSIN DD statement is used to provide input to programs that read data from the standard input (stdin). It is typically used for passing input data to utility programs rather than COBOL programs.

Option D) Instream data - Instream data is data that is included directly in the JCL rather than being referenced from a separate data file. While it is possible to pass data to COBOL programs using instream data, it is not the recommended or typical method.

The correct answer is B) PARM. This option is correct because the PARM parameter is specifically used to pass data from the JCL to COBOL programs.

Which of the following is used to compare sequential files/PDS?

  1. IEFBR14

  2. IEBCOPY

  3. IEBGENER

  4. IEBCOMPR

  5. None of the above


Correct Option: D

What is the purpose of DD DUMMY statement?

  1. Marks a deleted DD statement

  2. Begins an interpreted command stream

  3. Specifies no space allocation & no disposition processing

  4. Suppress command processing

  5. None of the above


Correct Option: C

What is the maximum number of In-stream procedures you can code in any job?

  1. 10

  2. 12

  3. 15

  4. 20

  5. 25


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of In-stream procedures in coding.

In-stream procedures are used in programming languages to perform specific tasks or operations within a job. These procedures are coded within the job itself and are executed in a specific sequence.

The maximum number of In-stream procedures that can be coded in any job depends on the programming language and system constraints. However, in general, there is typically a limit on the number of In-stream procedures that can be coded to ensure efficient execution and resource management.

In this case, the correct answer is C) 15. This means that you can code a maximum of 15 In-stream procedures in any job.

Which of the following is true. when both STEPLIB and JOBLIB statements are coded in a program?

  1. JOBLIB statement should precede the EXEC statement.

  2. STEPLIB is coded after the EXEC statement

  3. STEPLIB will override the JOBLIB specification

  4. All of the above


Correct Option: D

AI Explanation

To answer this question, we need to understand the purpose and usage of the STEPLIB and JOBLIB statements in a program.

The STEPLIB and JOBLIB statements are used in IBM Mainframe systems to specify the libraries or datasets that contain the load modules required for program execution. These statements help in resolving program dependencies and ensuring that the required modules are available during execution.

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

Option A) JOBLIB statement should precede the EXEC statement - This option is incorrect because the placement of the JOBLIB statement does not necessarily need to precede the EXEC statement. The JOBLIB statement can be coded anywhere in the program, as long as it is before the step that requires the specified load modules.

Option B) STEPLIB is coded after the EXEC statement - This option is incorrect because the STEPLIB statement should be coded before the EXEC statement. The STEPLIB statement is used to specify the libraries or datasets that contain the required load modules for a specific step in the program. Therefore, it needs to be coded before the step that requires those load modules.

Option C) STEPLIB will override the JOBLIB specification - This option is incorrect because the STEPLIB statement does not override the JOBLIB specification. The STEPLIB statement and JOBLIB statement serve different purposes. The JOBLIB statement specifies the libraries or datasets that contain the load modules required for the entire job, while the STEPLIB statement specifies the libraries or datasets that contain the load modules required for a specific step. Both statements can be used together to ensure that the required load modules are available.

Option D) All of the above - This option is correct because none of the previous options are completely correct. The correct answer is that when both STEPLIB and JOBLIB statements are coded in a program, the JOBLIB statement can be placed anywhere in the program and does not necessarily have to precede the EXEC statement. The STEPLIB statement needs to be coded before the EXEC statement and does not override the JOBLIB specification.

Therefore, the correct answer is option D) All of the above.

What parameter of the job statement is used to limit the CPU time consumed by the job?

  1. RUNTIME

  2. TIME

  3. LIMIT

  4. EXECMAX


Correct Option: B

AI Explanation

To answer this question, you need to understand the parameters used in a job statement to limit the CPU time consumed by a job.

Option A) RUNTIME - This option is incorrect because the RUNTIME parameter is used to specify the maximum elapsed time for a job, not the CPU time consumed by the job.

Option B) TIME - This option is correct because the TIME parameter is used to limit the CPU time consumed by the job. It specifies the maximum amount of CPU time that the job can use before it is terminated.

Option C) LIMIT - This option is incorrect because there is no parameter called LIMIT used to limit the CPU time consumed by a job.

Option D) EXECMAX - This option is incorrect because there is no parameter called EXECMAX used to limit the CPU time consumed by a job.

The correct answer is B) TIME. This option is correct because the TIME parameter is used to limit the CPU time consumed by the job. It specifies the maximum amount of CPU time that the job can use before it is terminated.

When output dataset space is required, what quantity categories are used?

  1. Primary, Secondary, Directory

  2. Address, Units, CONTIG or ALS

  3. Displacement and length

  4. Megabytes, Kilobytes and Bytes

  5. None of the above


Correct Option: A

AI Explanation

To answer this question, you need to understand the different quantity categories used when output dataset space is required.

Option A) Primary, Secondary, Directory - This option is incorrect because it does not represent the quantity categories used when output dataset space is required.

Option B) Address, Units, CONTIG or ALS - This option is incorrect because it does not represent the quantity categories used when output dataset space is required.

Option C) Displacement and length - This option is incorrect because it does not represent the quantity categories used when output dataset space is required.

Option D) Megabytes, Kilobytes, and Bytes - This option is incorrect because it does not represent the quantity categories used when output dataset space is required.

Option E) None of the above - This option is incorrect because there is a correct answer.

The correct answer is A) Primary, Secondary, Directory. These are the quantity categories used when output dataset space is required. Primary refers to the main storage space allocated for the dataset. Secondary refers to additional storage space allocated if the primary space is not sufficient. Directory refers to the space allocated for the dataset's directory information.

Therefore, the correct answer is A) Primary, Secondary, Directory.

To assign all the available storage for a job or job step, the REGION parameter should be coded as

  1. 0K

  2. 0M

  3. None of the above

  4. a & b


Correct Option: D

AI Explanation

To assign all the available storage for a job or job step, the REGION parameter should be coded as "0M".

Explanation:

The REGION parameter in a JCL (Job Control Language) specifies the amount of real storage, or memory, that is allocated to a job or job step. By default, a job or job step is allocated a small amount of storage, typically around 64KB.

To assign all the available storage to a job or job step, you can code the REGION parameter as "0M". The "0" indicates that no specific amount of storage is allocated, and the "M" indicates that the storage is specified in megabytes.

Option A) "0K" is incorrect because "K" indicates kilobytes, not megabytes. Option B) "0M" is correct because it assigns all the available storage to the job or job step. Option C) "None of the above" is incorrect because option B is the correct answer. Option D) "a & b" is the correct answer because both option A and option B are discussed, with option B being the correct one.

Which are the two system utilities that allow you to maintain and manage catalogs ?

  1. IEBGENER , IEBCOPY

  2. IEBCOPY,IEBCOMPR

  3. IEHPROGM,IEBGENER

  4. IEHLIST,IEHPROGM

  5. IEHPROGM,IEBCOPY


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) IEBGENER, IEBCOPY - These system utilities are used for copying and generating datasets, but they do not specifically deal with maintaining and managing catalogs. Therefore, this option is incorrect.

Option B) IEBCOPY, IEBCOMPR - IEBCOPY is a system utility used for copying, moving, and merging datasets. IEBCOMPR is a system utility used for comparing datasets. While IEBCOPY can be used for managing catalogs, IEBCOMPR does not specifically deal with catalog maintenance. Therefore, this option is partially correct.

Option C) IEHPROGM, IEBGENER - IEHPROGM is a system utility used for program management and does not specifically deal with catalog maintenance. IEBGENER is used for generating datasets but not for catalog maintenance. Therefore, this option is incorrect.

Option D) IEHLIST, IEHPROGM - IEHLIST is a system utility used for listing datasets and their attributes, including catalog information. IEHPROGM is a system utility used for program management. Both IEHLIST and IEHPROGM can be used for maintaining and managing catalogs. Therefore, this option is correct.

Option E) IEHPROGM, IEBCOPY - IEHPROGM is a system utility used for program management and does not specifically deal with catalog maintenance. IEBCOPY can be used for managing catalogs, but this option does not include the utility that specifically deals with catalog maintenance. Therefore, this option is incorrect.

The correct answer is D) IEHLIST, IEHPROGM. This option is correct because both IEHLIST and IEHPROGM are system utilities that can be used to maintain and manage catalogs.

What parameter directs the output of the job log dataset?

  1. JOBLOG

  2. MSGCLASS

  3. MSGLEVEL

  4. SYSLOG


Correct Option: B

AI Explanation

To answer this question, you need to understand the parameters related to job log datasets in a computing environment.

Option A) JOBLOG - This option is incorrect because JOBLOG is not a parameter that directs the output of the job log dataset. JOBLOG is used to specify the name of the job log dataset.

Option B) MSGCLASS - This option is correct because MSGCLASS is the parameter that directs the output of the job log dataset. MSGCLASS specifies the output class for the job log dataset. The job log messages are written to the specified output class.

Option C) MSGLEVEL - This option is incorrect because MSGLEVEL is not a parameter that directs the output of the job log dataset. MSGLEVEL is used to specify the level of detail for job log messages.

Option D) SYSLOG - This option is incorrect because SYSLOG is not a parameter that directs the output of the job log dataset. SYSLOG is used to specify the name of the system log dataset.

The correct answer is B) MSGCLASS. This option is correct because MSGCLASS is the parameter that directs the output of the job log dataset by specifying the output class for the job log messages.

How can a job’s execution priority be modified ?

  1. PRIQTY parameter

  2. PRTY parameter

  3. JOBCLASS parameter

  4. RUNTIME parameter


Correct Option: B

AI Explanation

To answer this question, you need to understand how the execution priority of a job can be modified. Let's go through each option to understand why it is correct or incorrect:

Option A) PRIQTY parameter - This option is incorrect because the PRIQTY parameter is not used to modify the execution priority of a job. The PRIQTY parameter is used to specify the priority of a printer or device.

Option B) PRTY parameter - This option is correct because the PRTY parameter is used to modify the execution priority of a job. By specifying a higher priority value, the job will be given higher priority for execution.

Option C) JOBCLASS parameter - This option is incorrect because the JOBCLASS parameter is used to specify the job class of a job, which helps in determining the scheduling priority of the job. It does not directly modify the execution priority of the job.

Option D) RUNTIME parameter - This option is incorrect because the RUNTIME parameter is used to specify the maximum amount of CPU time that a job can use. It does not modify the execution priority of the job.

The correct answer is Option B) PRTY parameter. This option is correct because the PRTY parameter is used to modify the execution priority of a job. By specifying a higher priority value, the job will be given higher priority for execution.

How can the attributes of one SMS dataset be copied to another dataset ?

  1. Using DD like parameter

  2. Using DD Copy parameter

  3. Using DD Refer parameter

  4. Attrubutes cannot be copied within SMS datasets


Correct Option: A

AI Explanation

To answer this question, you need to understand how attributes of SMS (System Managed Storage) datasets can be copied from one dataset to another.

Option A) Using DD like parameter - This option is correct because the DD LIKE parameter can be used to copy the attributes of one SMS dataset to another. When specifying DD LIKE=dataset-name, the attributes of the dataset named "dataset-name" are copied to the new dataset.

Option B) Using DD Copy parameter - This option is incorrect because there is no DD COPY parameter available for copying attributes of SMS datasets.

Option C) Using DD Refer parameter - This option is incorrect because there is no DD REFER parameter available for copying attributes of SMS datasets.

Option D) Attributes cannot be copied within SMS datasets - This option is incorrect because attributes of SMS datasets can indeed be copied using the DD LIKE parameter.

Therefore, the correct answer is A) Using DD like parameter. This option is correct because it allows for the attributes of one SMS dataset to be copied to another dataset.

Which is not a valid parameter for TYPRUN?

  1. SCAN

  2. RUN

  3. COPY

  4. None

  5. HOLD


Correct Option: B

AI Explanation

To answer this question, we need to understand the valid parameters for the TYPRUN command.

The TYPRUN command is used in mainframe systems to display information about a specific job. It allows users to view the output, error messages, and other details related to a job.

Let's go through each option to understand why it is valid or invalid:

Option A) SCAN - This option is a valid parameter for the TYPRUN command. It allows users to scan through the output of a job.

Option B) RUN - This option is not a valid parameter for the TYPRUN command. The correct parameter for running a job is SUBMIT, not TYPRUN.

Option C) COPY - This option is a valid parameter for the TYPRUN command. It allows users to copy the output of a job to another file or location.

Option D) None - This option is not a valid parameter for the TYPRUN command. It does not specify any action to be performed on the job.

Option E) HOLD - This option is a valid parameter for the TYPRUN command. It allows users to put a job on hold and prevent it from running.

The correct answer is Option B) RUN. This option is not a valid parameter for the TYPRUN command. The correct parameter for running a job is SUBMIT, not TYPRUN.

Which is not a valid value for RD parameter?

  1. R

  2. RNC

  3. NR

  4. RC

  5. None


Correct Option: D

Which is not a valid keyword parameter for EXEC?

  1. PARM

  2. PERFORM

  3. TIME

  4. ADDRSPC

  5. None


Correct Option: E

AI Explanation

To answer this question, we need to understand the valid keyword parameters for the EXEC statement.

The EXEC statement is used in various programming languages, such as COBOL, to execute a program or a procedure. It can take several keyword parameters to customize the execution of the program.

Let's go through each option to determine which one is not a valid keyword parameter for the EXEC statement:

Option A) PARM - This option is a valid keyword parameter for the EXEC statement. It is used to pass parameters to the executed program.

Option B) PERFORM - This option is not a valid keyword parameter for the EXEC statement. The PERFORM keyword is typically used in COBOL to initiate a section of code or a paragraph.

Option C) TIME - This option is a valid keyword parameter for the EXEC statement. It is used to specify the time limit for the execution of the program.

Option D) ADDRSPC - This option is a valid keyword parameter for the EXEC statement. It is used to specify the address space in which the program is executed.

Option E) None - This option is not a valid keyword parameter for the EXEC statement. It is not a keyword parameter at all.

Therefore, the correct answer is E) None. This option is not a valid keyword parameter for the EXEC statement.

- Hide questions