0

mainframe Online Quiz - 23

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

Assume a PL/I program that wants to execute a call to an external procedure. This procedure expects 1 parameter and returns 1 parameter. Which instructions do you have to provide in the main program? (1) DCL MYSUB ENTRY (CHAR(5)) EXTERNAL; (2) DCL MYSUB ENTRY (CHAR(5)) RETURNS (CHAR(5)) EXTERNAL; (3) DCL MYPARAMETER,MYRESULT CHAR(5); (4) CALL MYSUB (MYPARAMETER); (5) MYRESULT = MYSUB; (6) MYRESULT = MYSUB(MYPARAMETER);

  1. 1, 3 and 4

  2. 2, 3 and 4

  3. 2, 3 and 6

  4. 1, 3 and 5


Correct Option: C

Take a look at the following PL/I program. Assume A, B, C, ... being PL/I instructions. In which order will they be executed?MYPROG : PROCEDURE OPTIONS (MAIN);

  1. A B Z E F Z X

  2. A B X Z E F G H Z X

  3. A B X Z E F Z G H Z

  4. A B X Z G H Z


Correct Option: D

How to use host variables in DB2 queries while they accessed through cobol programs.

  1. A. A colon (:) must precede all host variables in an SQL statement

  2. B. A semi colon (;) must precede all host variables in an SQL statement

  3. C. We can use any variable directly

  4. D. None


Correct Option: A

Match the below SQL CODE (1,2,3,4,5) Cause (A,B,C,D,E) 1)904 A)The string representation of a date time value is not a valid 2)818 B) Resource unavailable 3)181 C)Duplicate key on insert or update 4)803 D)Deadlock or timeout. Rollback has been done 5)911 E)Plan and program: timestamp mismatch

  1. A. 1B, 2E, 3A, 4C, 5D

  2. B. 1D, 2A, 3E, 4C, 5B

  3. C. 1E, 2D, 3B, 4A, 5C

  4. D. 1C, 2D, 3E, 4A, 5B


Correct Option: A

What is the maximum Program Name length can be given in a Cobol Program.

  1. 10

  2. 20

  3. 30

  4. 40


Correct Option: C

In the Procedure Division of a COBOL program, which of the following is Optional?

  1. (A) Sections

  2. (B) Paragraphs

  3. (C) Sentences

  4. (D) Statements.


Correct Option: A

While Search in a VSAM file, if Return Code 23 is thrown, what it means.

  1. (A) Valid Key

  2. (B) Duplicate Key

  3. (C) Invalid Key

  4. (D) Empty VSAM file.


Correct Option: C

AI Explanation

To answer this question, we need to understand the meaning of Return Code 23 in the context of searching in a VSAM file.

Return Code 23 in VSAM indicates an "Invalid Key." This means that the key value provided during the search operation does not exist in the VSAM file. The search operation was unable to find a matching record with the specified key.

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

Option A) (A) Valid Key - This option is incorrect because Return Code 23 indicates an invalid key, not a valid key.

Option B) (B) Duplicate Key - This option is incorrect because Return Code 23 does not indicate a duplicate key. It specifically indicates an invalid key.

Option C) (C) Invalid Key - This option is correct because Return Code 23 in VSAM signifies an invalid key.

Option D) (D) Empty VSAM file - This option is incorrect because Return Code 23 does not indicate an empty VSAM file. It pertains to an invalid key.

Therefore, the correct answer is Option C) (C) Invalid Key. This option is correct because Return Code 23 signifies an invalid key in a VSAM file.

What can be the maximum number of digits declared in a variable?

  1. (A) 16

  2. (B) 17

  3. (C) 18

  4. (D) 19


Correct Option: C

Which of the below cannot be used in a JCL.

  1. (A) StartIF

  2. (B) Then

  3. (C) Goto

  4. (D) Else.


Correct Option: C

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

  1. (A) 9999

  2. (B) 999999

  3. (C) 9999999

  4. (D) 99999999


Correct Option: D

AI Explanation

To answer this question, we need to understand the format of the S9(8) COMP data type in COBOL.

The S9(8) COMP data type is used to represent a signed numeric value with a total of 8 digits, including the sign. The "S" indicates that it can represent positive or negative values, and the "9(8)" specifies that it can hold a maximum of 8 digits.

In COBOL, the COMP data type is used to store binary data. It is a binary representation of the numeric value, which allows for faster calculations and efficient use of memory.

To determine the maximum value that can be stored in S9(8) COMP, we need to consider the range of values that can be represented by 8 digits. Since the COMP data type is binary, each digit can be represented by 4 bits. Therefore, 8 digits would require a total of 32 bits.

The maximum value that can be represented by 32 bits is 2^32 - 1, which is 4294967295. However, since the S9(8) COMP data type includes a sign, we need to consider the range of signed values.

With 8 digits, the maximum positive value that can be stored in S9(8) COMP is (2^31 - 1), which is 2147483647. The negative value can range from -2147483648 to 2147483647.

Therefore, the maximum value that can be stored in S9(8) COMP is 99999999, as mentioned in option (D).

Please identify the utility to kill DB2 utilities, which is running / existing on table.

  1. A.KILL(Utilityname)

  2. B. TERM(UTILITY NAME)

  3. C.TERM

  4. D.KILL


Correct Option: B
  1. A. SELECT * FROM DB2P.SYSIBM.SYSPLANDEP WHERE BCREATOR = 'DBNAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME

  2. B. SELECT BNAME, BQUALIFIER, BTYPE, DCOLLID, DNAME FROM DB2P.SYSIBM.SYSPACKDEP WHERE BQUALIFIER = 'DATABASE NAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME

  3. C. (A) or (B)

  4. D. Neither (A) nor (B)


Correct Option: C

What is the use of DB2 utility RUNSTAT

  1. A. To take the copy of table

  2. B. To load the table

  3. C. To get the structure of the table

  4. D. NONE


Correct Option: C
  1. (A) Input

  2. (B) I-O

  3. (C) Output

  4. (D) A or B or C


Correct Option: B

How to check the success of your binding job

  1. A. Check the bind plan job run success in JMR

  2. B. Checking in the table SYSIBM.SYSPLAN

  3. C. (A) and (B)

  4. D. None


Correct Option: C

Which of the following is not DATABASE privilege?

  1. A. REPAIR

  2. B. UPDATE

  3. C. LOAD

  4. D. IMAGCOPY


Correct Option: B
  1. A. With Update

  2. B. Updating

  3. C. To Update

  4. D. For Update Of


Correct Option: D

20.In a program if two input files are being used and one of them will be created in Predeccesor job(it's not mandatory that the file should be created).Irrespective of the file creation if the job has to be run with out abend then what is the command used in COBOL program File division.

  1. (A) SELECT (File Name) [OPTIONAL] ASSIGN (FILE)

  2. (B) SELECT (File Name) [ALTERNATE] ASSIGN (FILE)

  3. (C) SELECT (File Name) [ELECTIVE] ASSIGN (FILE)

  4. (D) SELECT (File Name) [DISCRETIONARY] ASSIGN (FILE)


Correct Option: A

Which of the following is NOT a COBOL verb?

  1. (A) Start

  2. (B) Rewrite

  3. (C) Delete

  4. (D) Update.


Correct Option: D

AI Explanation

To answer this question, you need to have knowledge of COBOL verbs. Let's go through each option to understand why it is correct or incorrect:

Option A) (A) Start - This option is a valid COBOL verb used to initiate the processing of a file or a record.

Option B) (B) Rewrite - This option is a valid COBOL verb used to modify the content of a record that already exists in a file.

Option C) (C) Delete - This option is a valid COBOL verb used to remove records from a file.

Option D) (D) Update - This option is NOT a valid COBOL verb. There is no COBOL verb called "Update" used in COBOL programming.

The correct answer is D. This option is correct because "Update" is not a valid COBOL verb.

- Hide questions