| Oakwood Computing Ltd 1 Dornton Road South Croydon Surrey CR2 7DR UK Tel: +44 (0) 20 8686 7266 courses@oakwoodcomputing.co.uk |
| Updated 11 November, 2003 |
Contents: Top
Objectives
Introduction to PL/1
Character set, data names, comments, statements, program structure, scope
of data declared in procedures.
Defining data
Variables: names, values, attributes; string data, bit strings, arithmetic
data: fixed point decimal and binary, floating point, precision, picture variables,
decimal point, constants; structures, initialising structures; redefining
fields; LIKE; static and automatic variables, aligned data.
Operations, expressions, and assignments
PL/1 operators: arithmetic, comparison, logical, string; expressions; delimiters;
boolean conditions; assignments, conversion during evaluation of expressions,
intermediate fields.
Program control statements
DO groups; IF - THEN - ELSE; compound conditions; nested IF statements, labels;
SELECT; DO WHILE, DO UNTIL, controlled DO; common errors with DO groups; CALL
with procedures.
Built-in functions (1)
SUBSTR, STRING, INDEX, VERIFY, DATETIME, ADDR, ABS, ROUND, SUM, ADD, MULTIPLY,
DIVIDE, MIN, MAX, HIGH, LOW, TRANSLATE, pseudovariables. (Other built-in functions
will be covered later.)
Stream and consecutive record I/O
Declaring files; GET, PUT, EDIT, SKIP, DATA, LIST; record processing, ON ENDFILE,
READ, WRITE.
Processing VSAM files
Declaring VSAM files, ENV options and file attributes; error handling, ONCODES;
processing statements for sequential and random access: READ, WRITE, REWRITE,
DELETE.
Compiling programs
Compile-time options, %INCLUDE, output, nesting levels, procedure block levels;
link editor map.
Arrays
Defining arrays; cross section of an array; array of structures; HBOUND, LBOUND;
array operations; multi-dimensional arrays.
Edited picture fields and printer files
Zero suppression, decimal point, CR, DB, insertion characters, sign, currency
symbol: $ or £, *, page handling, ON ENDPAGE.
Error handling and ON conditions
ON units, SIGNAL, common conditions.
Procedures, functions, and program control
Procedures, BEGIN blocks, CALL, RETURN, procedure calls with and without parameters;
function calls with and without parameters; PLIRETC; ENTRY, external CALLs.
Built-in functions
(2)
Arithmetic functions: ABS, MAX, MIN, ROUND, SIGN, MOD, ADD, MULTIPLY,
DIVIDE, FLOOR, CEIL; character functions: HIGH, LOW; array functions: DIM,
HBOUND, LBOUND; miscellaneous functions: ANY, ALL, SUM, REPEAT, LENGTH, LINENO,
UNSPEC.
Advanced topics
Using based variables and pointers; creating and processing linked lists.