Handling errors

The CSA must include code to handle errors it receives from Open ClientConnect and, optionally, from DB2 or any other database it accesses.

Errors from Mainframe Client Connect are recorded in the SPRC (see “SPRC”) field of the SPAREA. Your CSA code should check that field for errors after issuing any CSA command.

See “Understanding how CSAs handle errors” for examples of error handling in CSAs. See Mainframe Connect Client Option and Server Option Messages and Codes for error codes relevant to CSAs.