Level Checking

HLL programs are dependent on receiving, at run time, an externally described file whose format agrees with what was copied into the program at compilation time. For this reason, the system provides a level-check function that ensures that the format is the same.

The RPG compiler always provides the information required by level checking when an externally described DISK, WORKSTN, or PRINTER file is used. The level-check function can be requested on the create, change, and override file commands. The default on the create file command is to request level checking.

Level checking occurs on a record-format basis when the file is opened unless you specify LVLCHK(*NO) when you issue a file override command or create a file. If the level-check values do not match, the program is notified of the error. The RPG program then handles the OPEN error as described in Handling Exceptions.

The RPG program does not provide level checking for program-described files or for files using the devices SEQ or SPECIAL.

For more information on how to specify level checking, refer to the DB2 Universal Database for iSeries section of the Database and File Systems category in the i5/OS Information Center at this Web site - http://www.ibm.com/systems/i/infocenter/.



[ Top of Page | Previous Page | Next Page | Contents | Index ]