Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Program organization

Programs
Program structure
Program activation
Program termination
Blocks
Block activation
Block termination
Packages
Procedures
PROCEDURE and ENTRY statements
ENTRY statement
Parameter attribute
Procedure activation
Procedure termination
Recursive procedures
Dynamic loading of an external procedure
Subroutines
Example 1
Example 2
Built-in subroutines
Functions
Examples
Built-in functions
Passing arguments to procedures
Using BYVALUE and BYADDR
Dummy arguments
Passing arguments to the MAIN procedure
Begin-blocks
BEGIN statement
Begin-block activation
Begin-block termination
Entry data
Entry constants
Entry variables
ENTRY attribute
OPTIONAL attribute
LIST attribute
LIMITED attribute
Generic entries
GENERIC attribute
Entry invocation or entry value
CALL statement
RETURN statement
Return from a subroutine
Return from a function
OPTIONS option and attribute
RETURNS option and attribute

This chapter discusses how statements can be organized into different kinds of blocks to form a PL/I program, how control flows among blocks, and how different blocks can make use of the same data.

Proper division of a program into blocks simplifies the writing and testing of the program, particularly when many programmers are writing it. Proper division can also result in more efficient use of storage, since automatic storage is allocated on entry to the block in which it is declared and released when the block is terminated.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)