Interview Questions.

Top 100+ Pl/i Interview Questions And Answers


Top 100+ Pl/i Interview Questions And Answers

Question 1. What Is Pl/i?

Answer :

PL/I is a 3rd-generation ( 3GL ) programming language developed within the early Sixties as an opportunity to assembler language (for low-stage pc processing functions), COBOL (for huge-scale business packages), and FORTRAN (for scientific and algorithmic packages). PL/I stands for "Programming Language 1".

Question 2. What Are The Language Features Of Pl/1?

Answer :

PL/I is Algol-fashion block-oriented language : Programs can complied one after the other and encompass exception blocks (stopped co-routines), everyday blocks (start blocks), statements and subroutines. Procedures may be inner or compiled one after the other. This type of shape permits the programmer to supply incredibly-modular packages. 

PL/1 become the first famous language that has construct-in preprocessor : This function became later copied (and abused) in C.  

A very neat generalization of Fortran's ability to use one by one compiled units. Process announcement and external reminiscence allocation elegance.

It described information sorts for an summary generalized pc with out regard for actual hardware.  PL/1 turned into the first wellknown reason language with usable string datatype.  It additionally has variable period bit strings.

One of the primary trendy motive language that has guidelines as first elegance language characteristic and BASED templates for them with arbitrary records shape.

PL/I contained very effective set of manage systems manipulate systems which in some methods stays unsurpassable and that is some distance superior to what C language got (despite C being a derivate of PL1). Of mainstream languages simplest Perl can compete with PL/1 as for richness and flexibility of control systems.

PL/I supports arrays, systems, unions, arrays of structures or unions, structures or unions of arrays, and combos thereof.

PL/1 concept of place and capability to allocate garage mainly location along with multi-access techniques was the assemble that allow OO-fashion programming without typical for OO overhead.

PL/1 become utilized in Multics as a gadget programming language, one of the first try to write OS in excessive degree language (that attempt stimulated Unix and C has through-and-massive PL/1 semantic and structure).

PL/1 compilers used to represent to fringe of compiler improvement with IBM optimizing and debugging compliers for many years representing the top of the class. PC/C compiler (which turned into advanced in Cornell and compiled huge subset of PL/1) turned into and stays one among fine compiler for educational purposes that I ever noticed. They nonetheless appearance first rate even now, half of a century s after their initial release, particularly in diagnostic messages exceptional.  

Multi tasking changed into carried out through PL/I F, the Optimizer and the newer AIX and Z/OS compilers. It comprised the statistics kinds EVENT and TASK,the TASK-choice at the CALL-declaration (Fork), the WAIT-announcement (JOIN), the DELAY(delay-time), EVENT-options on the report I/O statements and the UNLOCK declaration to unlock locked statistics on EXCLUSIVE documents. 

PL/SQL Interview Questions
Question three. What Are The Exceptions In Pl/1

Answer :

PL/1 turned into the first mainstream language that added exceptions. It is interesting to be aware that 1/2 of extensions of C++ consisting of exceptions was associated with capabilities that creators of C removed from PL/1 when they created the language :-).

It is exciting to word that PL/1 changed into the first programming language that offers correct handing of this kind of commonplace trouble as detection of the cease of the sequential report while studying. In PL/1 endfile situation is raised which turns on stopped coroutine (exception handler) within which  programmer can do something he wish however usually bounce to the announcement after the loop. This utilization of goto is in reality superior to inaccurate attempts to make this take a look at within the header of the loop like turned into accomplished in C and Perl.

   ... ... ...

It is crucial to be aware that PL/1 became used as a device programming language for such an vital running machine as  Multics -- the originator of many ideas that later have been reimplemented in Unix.  In in part bastardized way, key ideas and maximum of PL/1 statements and variables semantics can be found in C which need to probable be considered to be an oblique spinoff and wonderful simplification of PL/1 middle.

Question four. Explain About Multiple Entries In Procedures In Pl/1?

Answer :

One of entry points can function the constructor. Others as methods. But this is up to programmer. As methods can be nested that offers sub classing. If all variables had been static that constructor became now not certainly vital. Of path not anything changed into nonetheless formalized, but that turned into happening in early sixtieth not in late 80th .

But there has been a beauty in it: this turned into a completely easy and really powerful approach of creating your very own namespace for the set of procedures; technique that any programmer can easily research and efficaciously practice. So successfully that generally he/she did not write in different manner when you consider that this factor.

Allocation of variable within the stack become also elective as servers at this time have been certainly minuscule even in contrast with contemporary smartphones; the latter are a long way suprassing the most important of system 360 servers in skills such as CPU pace, memory length and the size of the harddrives. 

C++ Tutorial
Question five. Explain About Language Plus Preprocessor Scheme?

Answer :

PL/1 used the scheme that later became fashionable when it became reimplementation  in C and later went in C++: the idea of included preprocessor of the language. In PL/1 as a ways as I are aware of it was no longer broadly used, but become available in all complete language implementations, starting with IBM F compiler.

C++ Interview Questions
Question 6. Explain Pl/1 Program Structure?

Answer :

The power of PL/1 got here from a nicely organized set of statements and varieties of variables that it supported. It first delivered into language all 3 major lessons of variables which might be used in modern-day languages: static (like in Fortran commonplace), automated (allocated thru stack, destroyed on exit from the manner, and controlled (heap allocation).

It additionally contained some esoteric reminiscence allocation  functions like regions of reminiscence in which you can allocate your variables. Visibility become contolled by using technique scoping and there was special class outside variable that changed into exported in connected procedures (every variable was like separate common block in Fortran).

Question 7. Explain The History Of Pl/1?

Answer :

PL/1 became evolved as an IBM product in the mid 1960's, and become originally named NPL (New Programming Language). The name became changed to PL/1 to avoid confusion of acronym NPL with the National Physical Laboratory in England. The first PL/1 compiler that become shipped with OS/360 was so referred to as F-compiler. In was slow multipass compiler that became designed to function with tiny reminiscence amount of memory (64K) that was to be had in first mainframes.

Adv Java Tutorial Adv Java Interview Questions
Question eight. Explain About Data Declaration In Pl/1?

Answer :

When a PL/I program is achieved, it may manipulate many one-of-a-kind statistics gadgets of precise information sorts. Each records object, besides an unnamed arithmetic or string regular, is noted within the program through a call. Each records name is given attributes and a meaning by using a announcement (specific or implicit).

A data item is both the value of a variable or a constant. (Note that those terms, as used here, aren't exactly the same as in fashionable mathematical usage.) Data gadgets may be unmarried gadgets, referred to as scalars, or they can be a set of objects called facts aggregates which might be businesses of data gadgets that can be stated both collectively or for my part. The kinds of records aggregates are arrays, structures, and unions.

A variable has a value or values that would alternate for the duration of execution of a application. A variable is delivered with the aid of a assertion, which broadcasts the name and sure attributes of the variable. A call is explicitly declared if it appears in a DECLARE assertion that explicitly declares attributes of names.

A regular has a value that cannot trade. Constants for computational information are referred to by means of stating the cost of the constant or naming the steady in a DECLARE declaration.

Question 9. Explain About Data Sets?

Answer :

In addition to getting used as input from and output in your terminal, information units are saved on a diffusion of auxiliary storage media, along with magnetic tape and direct get right of entry to garage devices (DASDs). Despite their variety, these media have traits that allow commonplace techniques of collecting, storing, and transmitting records. The corporation of a information set determines how records is recorded in a statistics set and the way the statistics is sooner or later retrieved in order that it could be transmitted to the program. Records are saved in and retrieved from a records set both sequentially, on the basis of successive physical or logical positions, or without delay, by using the usage of keys specified in records transmission statements.

PL/I supports the subsequent sorts of data set groups:

Consecutive : In the consecutive information set enterprise, information are organized completely on the premise of their successive physical positions. When the information set is created, facts are written consecutively inside the order in which they may be offered. The records may be retrieved handiest within the order in which they have been written.

Indexed : In the listed records set company, information are located in a logical sequence primarily based on the key of each file. An indexed statistics set have to reside on an instantaneous-get right of entry to device. A character string key identifies the record and permits direct retrieval, substitute, addition, and deletion of records. Sequential processing is also allowed.

Relative : In the relative data set company, numbered records are located in a position relative to each other. The statistics are numbered in succession, starting with one. A relative statistics set must are living on a direct-access device. A key that specifies the file range identifies the document and lets in direct retrieval, alternative, addition, and deletion of information. Sequential processing is likewise allowed.

Regional :  The local data set organization is split into numbered regions, every of that may contain one record. The regions are numbered in succession, beginning with zero. A location can be accessed by using specifying its place number, and perhaps a key, in a records transmission declaration. The key specifies the region quantity and identifies the location to allow optimized direct retrieval, substitute, addition, and deletion of records.

The statistics set groups range inside the way they save records and inside the manner they use to get admission to facts.

PL/SQL and Informatica Interview Questions
Question 10. Explain About Data Transmission In Pl/1?

Answer :

PL/I makes use of two sorts of facts transmission: circulate and record.

In movement-oriented statistics transmission, the corporation of the data in the records set is disregarded within the program, and the information is dealt with as even though it were a continuous movement of individual statistics values in person shape. Data is transformed from person form to internal form on enter, and from inner shape to individual form on output.

In report-orientated facts transmission, the information set is a set of discrete statistics. The report at the outside medium is usually an precise reproduction of the document as it exists in internal storage. No statistics conversion takes location during report-orientated statistics transmission. On input, the facts is transmitted exactly as it is recorded within the statistics set, and on output, it's far transmitted precisely as it's miles recorded internally.

Go (programming language) Tutorial
Question 11. Explain Pl/i Interfaces To Other Products?

Answer :

PL/I can interface with type applications, C, the Checkpoint/Restart facility, and user exits.

The Sort application

The compiler presents an interface known as PLISRTx (x = A, B, C, or D) that permits you to make use of the IBM-supplied Sort programs.

When used from PL/I, the Sort program types statistics of all ordinary lengths on a massive range of sorting fields. Data of maximum kinds can be taken care of into ascending or descending order. The source of the information to be taken care of may be either a information set or a user-written PL/I method that the Sort software will call on every occasion a record is needed for the sort. Similarly, the destination of the kind can be a data set or a PL/I manner that handles the looked after information.

Inter-Language Communication with C

Inter-Language Communication (ILC) among PL/I and C lets in you to apply a number of the facts kinds not unusual to each languages and must permit you to jot down PL/I code that either calls or is called by way of C.
The Checkpoint/Restart facility

The PL/I Checkpoint/Restart feature presents a handy approach of taking checkpoints throughout the execution of a protracted-running application in a batch surroundings.
PL/I Checkpoint/Restart uses the Advanced Checkpoint/Restart Facility of the running system.
User exits

PL/I provides a number of consumer exits that allow you to customize the PL/I product to fit your wishes. The PL/I merchandise deliver default exits and the related supply files.
With PL/I, you may write your very own consumer go out or use the exit supplied with the product, either "as is" or changed, relying on what you need to do with it.
Go (programming language) Interview Questions
Question 12. Explain About Preprocessor In Pl/1?

Answer :

The PL/I compiler lets in you to pick out one or greater of the integrated preprocessors as required to be used on your program. You can choose the encompass preprocessor, the macro preprocessor, the SQL preprocessor, or the CICS® preprocessor—and you could pick the order in that you would like them to be referred to as.

Each preprocessor helps some of options to will let you tailor the processing to your desires.

Include preprocessor : This permits you to contain external supply files into your packages by the use of include directives aside from the PL/I directive %INCLUDE (the %INCLUDE directive is used to comprise external text into the source program).

Macro preprocessor : Macros let you write usually used PL/I code in a way that hides implementation info and the records this is manipulated, and exposes handiest the operations. In evaluation to a generalized subroutine, macros permit generation of simplest the code this is wished for each person use.

DB2 precompiler or DB2 coprocessor :In popular, the structure of your Pl/I program is the identical whether or not you want it to access a DB2 database. However, to retrieve, update, insert, and delete DB2 records, you should:

Connect to a statistics server : Execute SQL statements. SQL statements must begin with EXEC SQL.
Disconnect from the data server : To put together the program for execution, you follow this kind of procedures:
Preprocess, precompile, assemble, link, and bind this system.
Preprocess, then compile the program with the SQL option, and then hyperlink and bind the program.
Before you can take benefit of EXEC SQL support, you ought to have authority to get right of entry to a DB2® system.
Note that the PL/I SQL Preprocessor presently does now not aid DBCS.
CICS preprocessor : You can use EXEC CICS statements in PL/I programs that run as transactions underneath CICS.

PL/SQL Interview Questions
Question thirteen. Explain About The Sax Parser?

Answer :

The PL/I compiler offers an interface called PLISAXx (x = A or B) that offers you with fundamental XML functionality. The aid includes a excessive-speed XML parser, which permits applications to simply accept inbound XML messages, take a look at them for being nicely-formed, and transform their contents to PL/I data structures.

The XML guide does now not offer XML technology, which need to rather be executed through PL/I software common sense. The XML aid has no special environmental requirements. It executes in all of the most important runtime environments, consisting of CICS®, IMS™, and MQ Series, as well as z/OS batch and TSO.

F Sharp (programming language) Tutorial
Question 14. Explain About Pl/i Input And Output Statements?

Answer :

PL/I enter and output statements (consisting of READ, WRITE, GET, PUT) let you transmit records between the primary garage and auxiliary garage of a computer.

A series of facts outside to a application is referred to as a facts set. Transmission of facts from a facts set to a application is referred to as input. Transmission of statistics from a software to a statistics set is known as output. (If you are the usage of a terminal, "information set" can also imply your terminal.)

PL/I enter and output statements are concerned with the logical employer of a statistics set and now not with its bodily characteristics. A software can be designed with out particular understanding of the input/output devices which are used when the program is performed. To allow a supply program to deal usually with the logical factors of information in preference to with its physical enterprise in a statistics set, PL/I employs fashions of statistics units, known as documents. A file may be associated with special facts units at distinct times for the duration of the execution of a application.

Question 15. What Are The Data Types In Pl/1?

Answer :

Data kinds : 

A function of PL/I that contributes to the variety of packages for which it is able to be used is the kind of data types that can be represented and manipulated. Data kinds include:

Real or complicated, floating-factor or constant-point, signed or unsigned binary or decimal, and numeric and editable image records with programmer selected precision.
Varying or nonvarying, man or woman or bit or image, run-time adjustable or assemble-time constant length strings.
Program control records helping pointer and offset locators, adjustable or constant size areas for grouping of dynamic allocations, access facts ("characteristic guidelines"), and document, label, and format facts.
Areas may be written out to the disk and read back at a later date permitting maintenance of linked-lists.

Groovy (programming language) Interview Questions
Question sixteen. Explain About Data Arrays, Structures, And Unions In Pl/1?

Answer :

In PL/I, records items may be unmarried records elements or they may be grouped collectively to shape statistics aggregates that may be stated both together or individually. Data aggregates may be arrays, systems, unions, arrays of systems or unions, structures or unions of arrays, and combinations thereof, imparting a totally wealthy basis for the description and manipulation of any doable data.

For instance :  if an array of systems have been used to keep meteorological data for every month of the 20 th and the 21st centuries, it is probably declared as follows:

    Declare 1 Year(1901:2100),

              three Month(12),

                five Temperature,

                  7 High decimal constant(four,1),

                  7 Low decimal fixed(4,1),

                five Wind&us.Speed,

                  7 High decimal fixed(3),

                  7 Low decimal fixed(3),

                5 Precipitation,

                  7 Total decimal fixed(3,1),

                  7 Average decimal constant(three,1),

              3 * char(0);

The climate records for July 1991 is contained within the detail Year(1991,7) of the array of structures Year. Portions of this facts may be cited with the aid of Temperature(1991,7) or Precipitation(1991,7).

D Programming Language Tutorial
Question 17. Explain About Data Manipulation?

Answer :

Data may be manipulated as person items or as an aggregate. For example, one invocation of the SQRT integrated characteristic can take the rectangular root of a whole 15-dimensional array, producing an same array containing rectangular root values in the corresponding elements.

F Sharp (programming language) Interview Questions
Question 18. What Are The Storage Classes, Control, And Dynamic Storage Allocation?

Answer :

Four distinct garage lessons: AUTOMATIC, STATIC, CONTROLLED, and BASED are supplied.. Application objects' facts type, representation, nature of use, and many others. Commonly dictates the form of storage elegance used for each. Programmers can dynamically allocate and free based and controlled garage.

For all garage classes, information may be automatically initialized while it is allocated.

C++ Interview Questions
Question 19. What Are The Built-in Functions In Pl/1?

Answer :

Built-in functions:  PL/I affords nearly two hundred built-in functions, pseudovariables, and subroutines that manage scalar and combination statistics. These functions cowl:

Character, Bit, and Graphic string manipulation (e.G. INDEX, CENTER)
Arithmetic computation (e.G. MAX, RANDOM)
Mathematical computation (e.G. ATANH, GAMMA)
Floating point inquiries (e.G. HUGE, TINY)
Floating point manipulation (e.G. SUCC, SCALE)
Integer manipulation (e.G. IAND, RAISE2)
Precision dealing with (e.G. BINARY, UNSIGNED)
Array manipulation (e.G. HBOUND, SUM)
Storage manipulate (e.G. EMPTY, ADDR)
Condition dealing with (e.G. ONCHAR, ONLOC)
Input/Output (e.G. COUNT, FILEOPEN)
Date/Time manipulation (e.G. DATETIME, DATE)
Question 20. How Do We Handle Conditions In Pl/1?

Answer :

Condition handling : PL/I presents facilities to handle a diffusion of conditions that could stand up at some stage in PL/I program execution. These conditions can be predicted or unexpected and can be detected via the hardware (e.G ZERODIVIDE) or detected by means of PL/I (e.G. CONVERSION) or the working system or other software program. Using these centers, you can certainly write packages in PL/I which can offer non-forestall operations. No one comes close!

You may even deal with user initiated attention interrupts and regular and ordinary application termination.

Clipper (programming language) Interview Questions
Question 21. Explain About Macro Facility?

Answer :

The macro facility allows conditional compilation and change of PL/I source earlier than the compilation. For instance, a programmer might consist of specific code during development and checking out, and exclude it from a production software.

Question 22. Explain About Program Checkout?

Answer :

Conditions may be enabled in a variety of ways to have your application automatically diagnosed for

Array subscripts being out of range.
String and substrings being out of variety.
Data exceeding declared or gadget supported precisions.
Question 23. Explain About The Multics Pl/1 Compiler?

Answer :

The Multics PL/1 compiler is in many respects a "second era" PL/1 compiler. It turned into constructed at a time when the language was notably greater strong and nicely defined than it were whilst the primary compilers had been built [1,2]. It has benefited from the experience of the first compilers and avoids some of the problems which they encountered. The Multics compiler is the handiest PL/1 compiler written in PL/1 and is assumed to be the primary PL/1 compiler to supply high velocity item code.

D Programming Language Interview Questions