140 pts.
AS/400 errors
Level Check
what is level check error in AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

*** Copied from other question ***


A Level Check Error indicates that the layout of a file has been changed later than the program trying to access the file has been compiled. This is to ensure that your data remains consistent after file changes. It means that you should re-compile the program.

For example (if you didn’t have level checking) – you have a customer file :-

CUSTNO 5,0 – Customer Number
CUSTNM 40A – Customer Name

You have a program which maintains this data file for you. You then change CUSTNO to be 6,0 long and use your program to add a new customer. Your program would fill the first 5 positions of the new 6,0 long customer number with a number and put the first character from the customer name in position 6 of the customer number. Then it would put the rest of the customer name (starting from position 2) in the customer name.

The level checking feature on the AS/400 is to avoid data inconsistencies like the example above.


Martin Gilbert.


A “level check” refers to the relationship between a “format level identifier” attribute of a file and the attribute that a program expects the file to have. When the level of the file doesn’t match what a program expects, a “level check” occurs.

A format level identifier is like a “signature” for a file.

A record in a database file has a series of fields. The fields occur in the record in a defined order. Each field has a set data type and a particular length. When the file is created, the system takes the attributes of all of the fields in a record (a “format”) and generates a hash that is unique. When a program is compiled and references that file, the compiler takes the level ID from the file and puts it into the compiled program object.

From then on, whenever that program tries to open that file, the first thing the program does is compare the level ID from the file to the one stored in the program. If the values don’t match, the result is a level check. Maybe field lengths have been changed in a redesigned file. Maybe the fields have been put in a different order. Or maybe some changed a 5-digit part number to a 5-character part identifier.

Whatever happened to the file, the program needs to run through the compiler again in order to extract the new file attributes.


Discuss This Question:  

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: