You are here: LANSA for i User Guide > Appendix C. Technical Notes > User Defined Program/File Error Handler

User Defined Program/File Error Handler

To enable program/file errors which occur within LANSA or LANSA user applications to be recorded, a User Defined program/file error handler program can be called. To invoke the specified program these steps must be taken:

1.  Enter the name of the user defined program/file error handler program into the Name of user defined program/file error handler in Work with Execution and Security Settings.

2.  The user defined program/file error handler program must be set up to receive 3 parameters which are as follows:

Parameter Number

Type

Length

Description

1

A

10

Program name - contains the program name in which a program/file error has occurred.

2

A

1

Type of Error - contains the type of error which has occurred.

Values:
"F" = File Error occurred
"P" = Program Error occurred

3

A

varies

Information.
If the error was an "F" type error, this parameter will contain the data from the File Information Data Structure (for the program defined in parameter 1) at the time the file error occurred.
If the error was a "P" type error, this parameter will contain the data from the Program Status Data Structure (for the program defined in parameter 1) at the time the program error occurred.