Pl1 Quiz - Part 1

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Srinimf
S
Srinimf
Community Contributor
Quizzes Created: 6 | Total Attempts: 22,469
Questions: 20 | Attempts: 1,739

SettingsSettingsSettings
Law Quizzes & Trivia

This is the Quiz on PL1 for mainframe professionals.
Quiz by
Mainframe-Srini Blogs
http://srinimf. Wordpress. Com
http://srinibiz. Wordpress. Com
http://srinionline. Wordpress. Com


Questions and Answers
  • 1. 

    GET in PL1 is equal to ACCEPT in COBOL.

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 2. 

    PUT in PL1 equal to DISPLAY in COBOL.

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 3. 

    DECLARE is optional in PL1

    • A.

      Optional

    • B.

      Not optional

    • C.

      None

    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.

    Rate this question:

  • 4. 

    Entry in PL1?

    • A.

      It is no use

    • B.

      This will be given for External procedures

    • C.

      All internal procs

    • D.

      Both external and Internal Procs

    • E.

      None

    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.

    Rate this question:

  • 5. 

    Main: Proc options (Main) . . . END MAIN;

    • A.

      Options(Main) is not mandatory

    • B.

      Options(Main) is mandatory

    • C.

      None

    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.

    Rate this question:

  • 6. 

    Every statement must be ended with semi colon (;)

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 7. 

    DCL LIST(500)  STATIC FIXED DEC(5)

    • A.

      Static sotorage will be assigned when exactly it is needed

    • B.

      Static sotorage will be assigned at the begining of storage, remains allocated throught the execution of the program

    • C.

      Storage will not assigned

    • D.

      None

    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.

    Rate this question:

  • 8. 

    Which is the correct way of file declaration?

    • A.

      DCL ONE_1 FILE INPUT RECORD

    • B.

      DCL ONE_1 INPUT

    • C.

      DCL ONE_1 FILE RECORD

    • D.

      None

    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.

    Rate this question:

  • 9. 

    How the file will be read in PL1?

    • A.

      READ FILE (FILE_1)

    • B.

      READ FILE (FILE_1) INTO DATA_AREA

    • C.

      READ (FILE_1)INTO DATA_AREA

    • D.

      None

    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.

    Rate this question:

  • 10. 

    What is the ENDFILE condition in PL1?

    • A.

      ON ENDFILE (FILE_1)

    • B.

      ENDFILE (FILE_1)

    • C.

      ON ENDFILE

    • D.

      None

    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.

    Rate this question:

  • 11. 

    SBSTR(Title,3,3)==> what is Title here?

    • A.

      Any dataname

    • B.

      The data name from which we are getting substring

    • C.

      Unknown data name

    • D.

      None

    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.

    Rate this question:

  • 12. 

    OPEN FILE (FILE_1) TITLE (FNAME)...what is Fname?

    • A.

      DD Name

    • B.

      New file name

    • C.

      Record name

    • D.

      None

    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.

    Rate this question:

  • 13. 

    What is correct way of declaring Built-in fuctions?

    • A.

      DCL HBOUND;

    • B.

      DCL HBOUND BUILTIN;

    • C.

      HBOUND BUILTIN;

    • D.

      Both b,c

    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.

    Rate this question:

  • 14. 

    DCL PERCENT (3,4) FXED DEC(3,2); What is the size of this array?

    • A.

      1

    • B.

      3

    • C.

      2

    • D.

      None

    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.

    Rate this question:

  • 15. 

    ON ERROR is a error condition. Do we need to declare it or not?

    • A.

      No

    • B.

      Yes

    • C.

      None

    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.

    Rate this question:

  • 16. 

    What is the correct way to call sub program? 

    • A.

      DCL SUB1 ENTRY; CALL SUB1(A,B)

    • B.

      Call SUB1; CALL SUB1(A,B)

    • C.

      None

    Correct Answer
    A. DCL SUB1 ENTRY; CALL SUB1(A,B)
    Explanation
    a,b are to pass the date to SUB1

    Rate this question:

  • 17. 

    RETURN (SEND_VALUE)? is syntax correct?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Return to ternminate the procedure. It returns single vlalue.

    Rate this question:

  • 18. 

    DCL years   FIXED DEC(3) INIT '5';  what does INIT do?

    • A.

      It is not initializtion

    • B.

      It is not initializtion, it is first variable declared.

    • C.

      It is for initializtion

    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.

    Rate this question:

  • 19. 

    Logical statements used in PLI  are  DO-WHILE-END, IF- ELSE , SELECT- WHEN

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 20. 

    Stream and Record?

    • A.

      Stream means continuous data. RECORD means logical records

    • B.

      Stream means non continuous data. RECORD means logical records

    • C.

      Stream means continuous data. RECORD means non sequence logical records

    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.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 25, 2012
    Quiz Created by
    Srinimf
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.