VisualAge Generator to Enterprise Generation Language Migration Guide

I/O error value LOK

VisualAge Generator: LOK is always a soft error for OS/400. If an I/O error routine is specified for the function, the error routine gets control for the following:

EGL: LOK is replaced by deadlock, but it is a hard error. The try block and onException statement are used for error handling. If an onException statement is specified for the I/O statement, the onException statement gets control for the following:

Associated part needed for migration: Not applicable.

Figure 50. I/O error value LOK

Migrating with the associated part Migrating without the associated part
The migration tool always changes LOK to deadlock.

The migration tool does the same thing as mentioned in the Migrating with the associated part column.

Potential Problem 1: A problem arises if you do not set handleHardIOErrors (EZEFEC) = 1 for the program. In this case, because deadlock is a hard error, the onException statement will not get control and the program will end.

Solution: Make sure your programs specify handleHardIOErrors = 1;

Potential Problem 2: A problem also arises if you are explicitly testing for hardIOError (HRD) . In this case, because deadlock is a hard error, hardIOError will test true in EGL in some cases where it did not test true in VisualAge Generator. Validation and preprocessing will not detect an error. However, the program might not run the same as it did in VisualAge Generator.

Possible Solution: You might need to reorder the testing of the I/O error values in your program logic.

The same potential problems as in the Migrating with the associated part column can occur. You can use the same solutions.


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