Ÿ The

Dynamic

Screen

Manager (DSM)

supports

returned values in addition

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, t greater use of pointers in ILE APIs. The use of pointers can provide advantage.

Following

are

examples

of

an OPM API and an ILE

API that do

similar

func

(log or

report

software

errors). The ILE API

example makes

use of

poi

whereas

the

OPM

API

does

not. Both programs log software errors by

us

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 mo

the

data that is

pointed .1/to on(shownpage at6-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-2System API Programming V4R1

Page 130
Image 130
IBM Version 4 manual Without Pointers-ILE, This Program Calls Log Software Error Qpdloger, Perform Ffdc