programming languages Online Quiz - 245
Description: programming languages Online Quiz - 245 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
A DD statement has 2 types of parameters. Name them?
-
Positional, Keyword
-
Keyword, Control
-
Dynamic, Static
-
Named, Dynamic
-
None of the above
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:
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.
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?
-
Cylinders
-
Tracks
-
Blocks
-
All of the above
-
None of the above
To solve this question, the user needs to know the basic concepts of hard disk allocation. When a file is stored on a hard disk, the operating system needs to know where on the disk to store it. The hard disk is divided into smaller sections, and the operating system allocates these sections to files as needed. These sections are known as allocation units.
Now, let's go through each option and explain why it is right or wrong:
A. Cylinders: This option is correct. A cylinder is a group of tracks on a hard disk that are located at the same position of the disk's read/write head. Cylinders are used to allocate space on older hard disks.
B. Tracks: This option is correct. A track is a circular path on a hard disk that is used to store data. Tracks are used in conjunction with cylinders to allocate space on older hard disks.
C. Blocks: This option is correct. A block is a group of sectors on a hard disk that are allocated as a unit. Blocks are used to allocate space on modern hard disks.
D. All of the above: This option is correct. All of the options listed (cylinders, tracks, and blocks) are used to allocate space on hard disks.
E. None of the above: This option is incorrect. All of the options listed (cylinders, tracks, and blocks) are used to allocate space on hard disks.
The Answer is: D
Which of the following is used to copy partitioned datasets?
-
IEFBR14
-
IEBCOPY
-
IEBGENER
-
IEBCOMPR
-
None of the above
To solve this question, the user needs to know about mainframe utilities and their functions.
Option A: IEFBR14 is a dummy utility that does nothing but return a completion code of 0. It is not used for copying partitioned datasets, so option A is incorrect.
Option B: IEBCOPY is the correct answer. It is a mainframe utility used to copy, merge, and compare partitioned datasets. It can also be used to create empty partitioned datasets and members. Therefore, option B is correct.
Option C: IEBGENER is used to copy, transform, and print datasets. It is not used to copy partitioned datasets, so option C is incorrect.
Option D: IEBCOMPR is used to compare two datasets and identify differences between them. It is not used to copy partitioned datasets, so option D is incorrect.
Option E: None of the above is not the correct answer because the correct answer is option B.
Therefore, the answer is: B. IEBCOPY.
Inorder to not execute a step in the job after a return code of 8 in step1, what the step2 EXEC statement include?
-
COND = (8,NE)
-
COND = (8,GE)
-
COND = (8,EQ)
-
A & b
-
B & c
What is used to pass data from the JCL to COBOL programs?
-
PROC
-
PARM
-
SYSIN
-
Instream data
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.
How can unused space allocation be returned to the system when a dataset is closed?
-
RLSE
-
RETURN
-
CONTIG
-
CLOSE
Which of the following is used to compare sequential files/PDS?
-
IEFBR14
-
IEBCOPY
-
IEBGENER
-
IEBCOMPR
-
None of the above
To solve this question, the user needs to know the basic concepts of IBM Mainframe and the purpose of each utility mentioned in the options.
IEFBR14 is a dummy utility that does not perform any function but returns a completion code. Thus, option A is not used for comparing sequential files/PDS.
IEBCOPY is used for copying Partitioned Data Set (PDS), Partitioned Data Set Extended (PDSE), or Sequential Data Set (SDS) members. Thus, option B is not used for comparing sequential files/PDS.
IEBGENER is used to copy or generate a new dataset. It can be used to generate a sequential dataset from a partitioned dataset member, or copy a dataset to another dataset. Thus, option C is not used for comparing sequential files/PDS.
IEBCOMPR is used to compare two sequential files or PDS. It compares each record in one file with its corresponding record in the other file and produces a report of the differences. Thus, option D is the correct option used for comparing sequential files/PDS.
Therefore, the answer is: D. IEBCOMPR.
What is the purpose of DD DUMMY statement?
-
Marks a deleted DD statement
-
Begins an interpreted command stream
-
Specifies no space allocation & no disposition processing
-
Suppress command processing
-
None of the above
What is the maximum number of In-stream procedures you can code in any job?
-
10
-
12
-
15
-
20
-
25
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?
-
JOBLIB statement should precede the EXEC statement.
-
STEPLIB is coded after the EXEC statement
-
STEPLIB will override the JOBLIB specification
-
All of the above
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?
-
RUNTIME
-
TIME
-
LIMIT
-
EXECMAX
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?
-
Primary, Secondary, Directory
-
Address, Units, CONTIG or ALS
-
Displacement and length
-
Megabytes, Kilobytes and Bytes
-
None of the above
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
-
0K
-
0M
-
None of the above
-
a & b
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 ?
-
IEBGENER , IEBCOPY
-
IEBCOPY,IEBCOMPR
-
IEHPROGM,IEBGENER
-
IEHLIST,IEHPROGM
-
IEHPROGM,IEBCOPY
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?
-
JOBLOG
-
MSGCLASS
-
MSGLEVEL
-
SYSLOG
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 ?
-
PRIQTY parameter
-
PRTY parameter
-
JOBCLASS parameter
-
RUNTIME parameter
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 ?
-
Using DD like parameter
-
Using DD Copy parameter
-
Using DD Refer parameter
-
Attrubutes cannot be copied within SMS datasets
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?
-
SCAN
-
RUN
-
COPY
-
None
-
HOLD
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?
-
R
-
RNC
-
NR
-
RC
-
None
To solve this question, the user needs to have knowledge about the RD parameter in telecommunication. The RD (Radio Network Dimensioning) parameter is used to define the size of the radio network. It is used to control the number of cells in a radio network and the distribution of those cells.
Now, let's go through each option and explain which one is not a valid value for the RD parameter:
A. R: This is a valid value for the RD parameter. It stands for Rural.
B. RNC: This is a valid value for the RD parameter. It stands for Radio Network Controller.
C. NR: This is a valid value for the RD parameter. It stands for New Radio.
D. RC: This is not a valid value for the RD parameter. It is not an abbreviation for any radio network dimensioning term.
E. None: This is not a valid value for the RD parameter as it does not define any radio network dimensioning parameter.
Therefore, the answer is: D. RC.
Which is not a valid keyword parameter for EXEC?
-
PARM
-
PERFORM
-
TIME
-
ADDRSPC
-
None
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.