Tips, Tricks, and Techniques
Last update: 20 July 2007
From Steve Robinson -- S.L. Robinson & Associates, Inc.
Dieter Storr added examples
The "Worst Offenders"
EXAMINE of an array
- Do not EXAMINE arrays
But: problems occur when searching for "bcd"
in the arrays "abc" "def" "ghi"
- Do not use FOR loops
- Do EXAMINE strings
SCAN is faster than EXAMINE, for example
IF #I = SCAN = "."
See also EXAMINE of a string.
READ WORK FILE [RECORD]
- Without the RECORD option, READ WORK FILE "confirms" the format of all fields.
- With the RECORD option, there is no format checking.
- Tests at LA Times: We could reduce the duration of twp long running
batch jobs by approximately 2 hours each, for example.
READ WORK FILE .... OFFSET
- Without OFFSET, all field formats are checked.
- With OFFSET, only specified field formats are checked.
- External PERFORMs. Only when code is to be shared inter program.
- Internal PERFORMs. Only when code is to be performed from various
- This is a "biggie."