Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

IBM-Mainframes

PLI Training Class- 01

www.mainframes-online-training.weebly.com

Polsani Anil Kumar

Background and History

PLI is an acronym for: Programming


Roman I

Language/ 1 with a

PL/I is a procedural, imperative computer programming


language and designed for scientific, engineering, business and
systems programming applications.

PL/I was designed to solve business problems


PL/I was designed to be English-like, so that the reader, even a
non-programmer, could get an idea of what was going on in the
program simply by reading the code

Background and History

PLI was developed by IBM in mid 1960s and was originally


named as NPL ( New Programming Language ) and is actively
used as of 2012.

The first compiler was delivered in 1966. The Standard for PL/I
was approved in 1976.

PLI was the first large scale attempt to design a language that
could be used in a variety of application areas.

Features of PLI
PL/I's principal domains are:

Data processing
Numerical computation
Scientific computing
Systems programming

Its supports recursion, structured programming, linked data structure


handling, fixed-point, floating-point, complex, character string
handling, and bit string handling.

The language syntax is English-like and suited for describing complex


data formats, with a wide set of functions available to verify and
manipulate them.

Structure of PLI Program

LABELNAME: PROCEDURE OPTIONS(MAIN);


STATEMENT1;
STATEMENT2;
END LABELNAME;
End of the label name is specified by colon (:)
End of statement is specified by semi colon (;)

Structure of PLI Program

A PL/I program consists of a set of procedures, each of which


is written as a sequence of statements. Block of code is called
as a Procedure or simply PROC.

First statement in program is the PROCEDURE statement


Procedure statement is not executable, it is simply a way of
telling the computer that this statement marks the beginning of
the block of PLI statement

Procedure statement must always be labeled


DISPGM: PROCEDURE OPTIONS(MAIN);

DISPGM is label, MAIN is main program

Internal & External Procedures

Procedure are of two types:


External Procedure and
Internal Procedure

Names of external procedures can have a maximum of 8


characters

-,#,@ should not be used while naming external procedures

Internal procedures are nested within the external procedure

External procedure names are known to OS by PROCEDURE


with OPTIONS(MAIN)

END statement is used to mark end of procedures.

Character Set in PLI

Extended alphabet of characters

A-Z , @, #,$.

10 DECIMAL digits

0-9

21 special characters

Blank , = , + , - , ( , ) , * , & , % , ~ , <=


,>= ,< ,>

,_

,?

,/

,or

,not,

;, :.

PLI Layout/PLI Code Sheet (1 - 80)

1. 1 Reserved for Operating System.


2. 2-72 PLI STATEMENTS.
3. 73-80 Sequence number / comments
4. Comments can be specified in between
/*

COMMENT LINE

*/

My First PLI Program

Hello world! Program


/* This Is My First Program */
DISPGM: PROCEDURE OPTIONS(MAIN);
PUT LIST(HELLO WORLD!);
PUT SKIP LIST(HELLO ALL);
END DSIPGM;
This Program gives HELLO WORLD! As Output.

Thank You

www.mainframes-online-training.weebly.com

Polsani Anil Kumar

You might also like