HP RPG/XL Programmer's Guide (30318-90001)

A- 2
External Subroutine Call Parameters
You can pass parameters with an EXIT Calculation Specification operation
(the parameters are identified by PARM operation(s) immediately following
EXIT). EXIT makes it easier to use subroutines written in Business BASIC,
C, Pascal, COBOL and FORTRAN.
Run-Time Error Options
RPG provides three methods for handling run-time errors:
1. Using the Header Specification to specify whether to ignore the
error or whether to abort the program.
2. Letting the operator determine, at run-time, how to handle the
error.
3. Using Calculation Specification to handle the error. (this method
provides an individualized way of handling the error.)
Cross-Reference Listing
The Cross-Reference listing shows all line references to file names,
indicators, and field names. You must specifically request this listing
using the Header Specification or the MAP option of the $CONTROL compiler
subsystem command.
EBCDIC/ASCII Translation
You can have HP RPG automatically generate file translation tables for
EBCDIC-to-ASCII, EBCDIK to JIS, or ASCII-to-EBCDIC, JIS to EBCDIK
conversions. Or, you can use the EBCDIC or EBCDIK alternate collating
sequence.
Partial Field Translation
You can have HP RPG translate just alphanumeric and unpacked numeric
fields, leaving packed numeric and binary fields unchanged.
Combined Input/Output (Terminal) File
HP RPG lets you use a terminal as a single file. This allows both read
and write operations for the file.
Calculation Indicator Repetition
HP RPG lets you enter conditioning indicators once in Calculation
Specifications and repeat them on successive lines.
Compile-Time Tables/Arrays on Separate Disc Files
If you're using a compile-time table or array in more than one program,
select one program in which to define it, then include an Array/Table
File Name Specification (A) in each of the remaining programs. The table
or array is saved on disc and each Array/Table File Name Specification
references that disc file.
Structured Programming Constructs
The following Calculation Specification operations let you use standard
structured programming techniques: DO-WHILE, DO-UNTIL and IF-THEN-ELSE.
EXCPT Group Names
You can name a group of Output Specifications with the EXCPT Calculation
Specification operation.
Full Procedural Files
The READE Calculation Specification operation reads the next sequential
record in a demand or full procedural file whose key matches a specified
key field. The READP operations reads the previous record for that key
field.
RPG Screen Interface (RSI)
RSI lets you use screen (terminal) files in an RPG program. RSI forms
processing provides: