1.
GET in PL1 is equal to ACCEPT in COBOL.
Correct Answer
A. True
Explanation
In PL1 (Programming Language 1) and COBOL (Common Business-Oriented Language), both GET and ACCEPT are used to read input data. GET is used in PL1 to read data from an input file, while ACCEPT is used in COBOL to read data from the user. Therefore, the statement "GET in PL1 is equal to ACCEPT in COBOL" is true, as both functions serve the same purpose in their respective languages.
2.
PUT in PL1 equal to DISPLAY in COBOL.
Correct Answer
A. True
Explanation
In COBOL, the "PUT" statement is used to write data to an output file, while the "DISPLAY" statement is used to write data to the screen. Both statements are used for output purposes, so it can be said that the functionality of "PUT" in PL1 is equal to that of "DISPLAY" in COBOL. Therefore, the statement "PUT in PL1 equal to DISPLAY in COBOL" is true.
3.
DECLARE is optional in PL1
Correct Answer
A. Optional
Explanation
In PL1, the DECLARE statement is optional. This means that it is not required to include the DECLARE statement in PL1 programs. The DECLARE statement is used to declare variables and their attributes before they are used in the program. However, in PL1, it is possible to use variables without declaring them explicitly using the DECLARE statement. This flexibility allows programmers to choose whether or not to include the DECLARE statement based on their coding preferences or specific requirements of the program.
4.
Entry in PL1?
Correct Answer
B. This will be given for External procedures
Explanation
This answer suggests that the entry in PL1 will be given for external procedures. It implies that the given statement "It is no use" will only apply to external procedures and not to internal procedures. Therefore, the entry in PL1 will not be applicable to all internal procs or both external and internal procs.
5.
Main: Proc options (Main)
.
.
.
END MAIN;
Correct Answer
B. Options(Main) is mandatory
Explanation
The given correct answer states that "Options(Main) is mandatory." This means that in the main procedure, it is required to have the Options statement. Without the Options statement, the main procedure may not function correctly or may not have the desired behavior. Therefore, it is necessary to include the Options(Main) statement in the main procedure.
6.
Every statement must be ended with semi colon (;)
Correct Answer
A. True
Explanation
The given correct answer is "True". This means that the statement or question being referred to is true or accurate.
7.
DCL LIST(500) STATIC FIXED DEC(5)
Correct Answer
B. Static sotorage will be assigned at the begining of storage, remains allocated throught the execution of the program
Explanation
The correct answer is that static storage will be assigned at the beginning of storage and remains allocated throughout the execution of the program. This means that when the program starts, a fixed amount of storage (in this case, 500 bytes) will be allocated for the static variable. This storage will remain allocated throughout the entire execution of the program, even if the variable is not currently being used. This ensures that the variable retains its value between different function calls and can be accessed at any point during the program's execution.
8.
Which is the correct way of file declaration?
Correct Answer
A. DCL ONE_1 FILE INPUT RECORD
Explanation
The correct way of file declaration is "DCL ONE_1 FILE INPUT RECORD". This declaration specifies that the variable ONE_1 is a file, and it will be used for input operations. Additionally, it specifies that the records in the file will be of type RECORD.
9.
How the file will be read in PL1?
Correct Answer
B. READ FILE (FILE_1) INTO DATA_AREA
Explanation
The correct answer is "READ FILE (FILE_1) INTO DATA_AREA". In PL1, the READ statement is used to read data from a file. In this case, the FILE_1 file is being read and the data is being stored in the DATA_AREA.
10.
What is the ENDFILE condition in PL1?
Correct Answer
A. ON ENDFILE (FILE_1)
Explanation
The correct answer is "ON ENDFILE (FILE_1)". In PL1, the ON ENDFILE condition is used to specify that a particular action should be taken when the end of a file (FILE_1 in this case) is reached. This condition is used to handle the situation when there is no more data to read from the file, allowing the program to perform necessary actions or terminate gracefully.
11.
SBSTR(Title,3,3)==> what is Title here?
Correct Answer
B. The data name from which we are getting substring
Explanation
The correct answer is "The data name from which we are getting substring." This means that the function SBSTR is being used to extract a substring from a specific data name, which is referred to as "Title" in this case.
12.
OPEN FILE (FILE_1) TITLE (FNAME)...what is Fname?
Correct Answer
A. DD Name
Explanation
The correct answer is "DD Name". In mainframe computing, DD (Data Definition) is a keyword used to define and allocate input/output files. It specifies the logical name of a file, which is used by the system to identify and access the file during program execution. Therefore, "DD Name" refers to the logical name of the file in the given scenario.
13.
What is correct way of declaring Built-in fuctions?
Correct Answer
D. Both b,c
Explanation
The correct way of declaring Built-in functions is by using the DCL statement followed by the function name and the BUILTIN keyword. Both options b and c follow this format correctly, so they are both correct ways of declaring Built-in functions.
14.
DCL PERCENT (3,4) FXED DEC(3,2);
What is the size of this array?
Correct Answer
C. 2
Explanation
The size of the array in this case is 2. This is because the DCL statement is declaring an array named PERCENT with a size of 3 rows and 4 columns, and each element of the array is of type FXED DEC with a precision of 3 and a scale of 2. Therefore, the array has a total of 3 * 4 = 12 elements, but the size of the array itself is 2, as it is a two-dimensional array with dimensions 3 rows and 4 columns.
15.
ON ERROR is a error condition. Do we need to declare it or not?
Correct Answer
A. No
Explanation
ON ERROR we no need to declare, but for rest all built in functions we need to do it. Not required for eror conditions.
16.
What is the correct way to call sub program?
Correct Answer
A. DCL SUB1 ENTRY;
CALL SUB1(A,B)
Explanation
a,b are to pass the date to SUB1
17.
RETURN (SEND_VALUE)? is syntax correct?
Correct Answer
A. True
Explanation
Return to ternminate the procedure. It returns single vlalue.
18.
DCL years FIXED DEC(3) INIT '5'; what does INIT do?
Correct Answer
C. It is for initializtion
Explanation
The INIT keyword in DCL (Data Control Language) is used for initialization. In this specific case, the INIT '5' statement initializes the variable "DCL years" to the value of 5.
19.
Logical statements used in PLI are DO-WHILE-END, IF- ELSE , SELECT- WHEN
Correct Answer
A. True
Explanation
The given statement is true. PLI (Programming Language Interface) does indeed use logical statements such as DO-WHILE-END, IF-ELSE, and SELECT-WHEN. These statements are used for control flow and decision-making in PLI programs. The DO-WHILE-END statement is used for iterative execution, the IF-ELSE statement is used for conditional execution, and the SELECT-WHEN statement is used for multiple conditional execution. These logical statements are essential in writing PLI programs to control the flow of execution based on certain conditions.
20.
Stream and Record?
Correct Answer
A. Stream means continuous data. RECORD means logical records
Explanation
The correct answer is "Stream means continuous data. RECORD means logical records." In data processing, a stream refers to a continuous flow of data, where information is transmitted or processed in a continuous manner. On the other hand, a record represents a logical unit of data that contains related information. Therefore, a stream refers to continuous data, while a record represents logical records.