num_objs, &ErrorCode, ile_mod_name);

} /\ UNEXPECTED_HDLR \/

Reporting

Software Error (ILE

API with Pointers)—ILE C Example

 

 

This program

calls

the

Report Software Error (QpdReportSoftwareError) AP

perform

FFDC,

and

uses

pointers. The

ILE program

sets a

.pointer2/

(shown

on page

6-10)

to

point

to the same

location as

in the

OPM.1/ program (sh

on page 6-6). /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

 

\/

/\Program Name: FFDCPGM2

\/

/\

 

\/

/\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

\/

/\

qpdsrvpg

\/

/\

qusec

\/

/\

 

\/

/\APIs Used:

QpdReportSoftwareError

\/

/\

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\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

<qpdsrvpg.h>

/\

from

QSYSINC/H

\/

#include

<qusec.h>

/\

from

QSYSINC/H

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Definitions used for developing key information for FFD￿C. \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ #define CHARACTER 'C'

#define MAX_KEYS 3 #define MESSAGE "MSG" #define MESSAGE_LEN 7 #define MSG_SYMPTOM_LEN 3

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

Structures

\/

Chapter 6. Original Program Model (OPM) and Integrated Language Environment (ILE)6-7Difference

Page 135
Image 135
IBM Version 4 manual API with Pointers-ILE C Example, Unexpectedhdlr, Software Error ILE, Qcle/H, Qsysinc/H