Typical use of Serviceability APIs

Typical uses of serviceability APIs include history logs and error handles.

History log:

Serviceability APIs provide a tracking mechanism for activity that is taking place on the client workstation. As a result, you can use the message-logging APIs to log messages to the iSeries™ Access for Windows® History Log. Examples of messages to log include an indication that your application was started, and other significant events. For example, a log message may indicate that a file successfully was transferred to the iSeries server, a database query failed for some reason, or that a job was submitted for printing.

The product and component strings that you provide when you are using the Serviceability APIs allow your messages and events to be distinguished from other entries in the service files. The recommended hierarchy is to define a product ID, with one or many component IDs defined under it.

Error handles:

Use the error-handle parameter on iSeries Access for Windows C/C++ APIs to retrieve message text that is associated with a failure return code. This enables your application to display the message text, instead of providing your own text for the set of iSeries Access return codes.