PP2 provides a mechanism for retrieving the CLIv2, TDP, PP2 runtime or Teradata Database return codes; and the message text associated with SQLCODE.
When SQL Flagger warnings are found, only the first such warning for a particular statement is available through PPRTEXT.
The application issues a call to PPRTEXT, passing four parameters as input to the routine. Typical PPRTEXT usage is shown in the “Dynamic Statement Example” on page 174. For additional information on PPRTEXT, see Messages (B035‑1096).
The four parameters are defined in “SQL Error Return—Teradata Mode,” along with an example of how an application might call this routine.