![]() |
PL/I Intermediate / Advanced Programming
Duration: 5 days |
Participants: PL/I applications programmers. |
Objectives:
Upon successful completion of this course you will be able to:
- Choose the appropriate data type, organization, and storage class for program variables. - Understand and apply the concept of based variables. - Understand the effects of alignment on program efficiency and structure mapping. - Understand the concept of the block structure of a PL/I program. - Code function procedures. - Code argument/parameter passing for a procedure. - Diagnose expression evaluation and data conversion errors, and provide solutions to their pitfalls. - Code preprocessor replacements and simple macros. |
Overview:
This course presents topics of interest to a programmer who has basic knowledge of PL/I. Its purpose is to increase the programmer's knowledge of the PL/I language by presenting the concepts, applications, efficiencies, and pitfalls of each topic covered. General topics:
- Day 1: Data Types and Organizations - Day 2: Data Conversions and Expression Evaluation - Day 3: Procedure Coding - Day 4: Storage Classes and Management - Day 5: The Preprocessor |
Prerequisites: Previous attendance at a basic PL/I programming course or six months PL/I applications programming experience is recommended. |
Format: Lecture and discussion with daily hands-on exercises. |
Topic Outline:
- Day 1: Data Types and Organizations The DECLARE Statement Review Scalars and Aggregates Data Formats, Attributes and Usage Strings Arithmetic DEFAULT Statement Arrays Dimension Attribute Initialization Multi-dimensional Cross-Sections Structures Arrays of Structures Multi-dimensional Cross-Sections Data Type Alignment ALIGNED attribute UNALIGNED attribute Effects on program efficiency Structure Mapping Effects of alignment on structure mapping Mapping pairs - Day 2: Assignment, Expression Evaluation, and Conversions Assignment String assignment rules Arithmetic assignment rules Array assignment rules Structure Assignment rules by position BY NAME Expression Evaluation Operational Expressions Builtin Functions Arithmetic Operations on scalars and aggregates Fixed-point division pitfall, DIVIDE builtin function Binary fraction pitfall, DECIMAL builtin function Concatenation Operation evaluation STRING and REPEAT builtin functions Logical Operations Operation evaluation BOOL, ANY, ALL builtin functions Comparison operations Comparison rules Builtin functions for comparison Data Conversions Fixed and Character conversions Character and Bit conversions UNSPEC builtin function Conversion rules - Day 3: Procedure Coding Block Environment Prolog Epilog Scope of a variable's name BEGIN Blocks Syntax Use PROCEDURE Blocks Syntax Flow of Control Argument/Parameter Coding and Use Dummy argument creation CONNECTED attribute for parameters * attribute for parameters External Procedure Coding ENTRY attribute Declaring an external entry point Parameter attribute descriptor list RETURNS attribute * PROCESS statement Subroutine Procedures Syntax Flow of Control Use Function Procedures Syntax Flow of Control Use Secondary Entry Points Entry statement Use - Day 4: Storage Classes Storage Classes Overview Types Storage Region AUTOMATIC Storage Definition Use Efficiencies and Pitfalls Location STATIC Storage Definition Use Efficiencies and Pitfalls Location External Storage Storage Classes for: Definition Use Efficiencies and Pitfalls Location BASED Storage Definition Uses ADDR builtin function for storage overlay DEFINED vs. BASED Storage ALLOCATE statement for Based Storage Record I/O Locate Mode Reading multi-format record structures SCALARVARYING attribute for varying length string I/O REFER option for self-defining data CONTROLLED Storage Definition Use Inefficiencies and Pitfalls Location ALLOCATE and FREE statements Delaying Allocation and Stacking Storage Class Management Storage Requirements Table Requesting the ISA PLIXOPT variable Storage Management Report - Day 4: The Preprocessor The Compiler Overview The Compile Time Facilities Inclusion of External Text INCLUDE and MACRO compiler options %INCLUDE statement Source Code Replacement %DECLARE statement %assign statement Uses for preprocessor replacement Source Code Generation Preprocessor procedure concepts %PROCEDURE statement Uses for preprocessor procedures Preprocessor builtin functions Preprocessor Concepts Scanning and Rescanning Insource and Source Activation and Deactivation |
|