The Dynamic Screen Manager (DSM) supports returned values in addition to
the error code parameter.
The
errnos
are provided as include files in the QSYSINC library.
Pointers
Due to the greater availability of pointer support in ILE languages, there is a much
greater use of pointers in ILE APIs. The use of pointers can provide a performance
advantage.
Following are examples of an OPM API and an ILE API that do similar functions
(log or report software errors). The ILE API example makes use of pointers,
whereas the OPM API does not. Both programs log software errors by using first-
failure data capture (FFDC).
Logging Software Error (OPM API without Pointers)—ILE C
Example
This program calls the Log Software Error (QPDLOGER) API to perform FFDC.
The program does not make use of pointers. The OPM program physically moves
the data that is pointed to (shown at 1 on page 6-6), which slows down perfor-
mance.
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ ᑍ/
/ᑍProgram Name: FFDCPGM1 ᑍ/
/ᑍ ᑍ/
/ᑍProgram Language: ILE C ᑍ/
/ᑍ ᑍ/
/ᑍDescription: This program illustrates how to use APIs to log ᑍ/
/ᑍ software errors using FFDC. ᑍ/
/ᑍ ᑍ/
/ᑍ ᑍ/
/ᑍHeader Files Included: except ᑍ/
/ᑍ stdio ᑍ/
/ᑍ string ᑍ/
/ᑍ qmhchgem ᑍ/
/ᑍ qpdloger ᑍ/
/ᑍ qusec ᑍ/
/ᑍ ᑍ/
/ᑍAPIs Used: QPDLOGER ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ System Includes ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#include <except.h> /ᑍ from QCLE/H ᑍ/
#include <stdio.h> /ᑍ from QCLE/H ᑍ/
#include <string.h> /ᑍ from QCLE/H ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Miscellaneous Includes ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#include <qmhchgem.h> /ᑍ from QSYSINC/H ᑍ/
#include <qpdloger.h> /ᑍ from QSYSINC/H ᑍ/
#include <qusec.h> /ᑍ from QSYSINC/H ᑍ/
6-2 System API Programming V4R1