exception. You

cannot receive

a

diagnostic message

(if one were

se

to the escape message) in the error-code data structure.

You

can

handling APIs to receive messages

from

your

program

message

queue

an

access the other messages that

may be issued from the

API. Append

System API Referencebook contains an

example

of

a

diagnostic

report

pro

that uses

the

message handling APIs.

 

 

 

 

 

 

 

 

 

When you instruct the API to return all

errors

in

the

error-code

da

escape message does not appear in the job log. The escape message

appearing in the job log is one

of the

major

differences

between

return errors in an error-code data structure and

letting

the

API

s

sages. For the error-code data structure, the escape messages have

removed from the job log by the API. If a diagnostic message is

diagnostic

message exists in

the

job

log

and can

be

received.

 

Accessing the HOLD Attribute—OPM

RPG

Example

 

 

 

 

 

The

following

is

the

RPG

code used to access the HOLD attribute. T

same

type

of

program as the RPG program examples in “Retrieving the

 

Parameter (Exception Message)—OPM RPG Example”

on page 3-6

and

 

 

 

“Retrieving the

Hold Parameter (Error Code Structure)—OPM RPG Example” on

page 3-11. The

program,

named JOBDAPI, prints

the value

of

HOLD

if

i

(.17/ on page 3-19). If

an error occurs, the program

prints

a

line

t

error message

ID

to

a

spooled file.18/calledon

pageQPRINT3-19)( .

 

 

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

F\

F\Program Name: JOBDAPI

F\

 

F\Language:

OPM RPG

F\

 

F\Descriptive Name: Get Job Description

F\

 

F\Description: The following program prints out the name of

F\

the job description or prints an error if the

F\

API could not find the job description name

F\

specified.

F\

 

F\

 

F\Header Files Included: QUSEC - Error Code Parameter

F\

QWDRJOBD - Retrieve Job Description API

F\

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

F\ JOBDAPIR - Print value of HOLD parameter using API

F\

Uses

error-code data structure

F\

 

 

 

 

 

FQPRINT O

F

132

OF

PRINTER

I\

 

 

 

 

 

I\ Error Code Parameter Include for the APIs

I\

I/COPY QSYSINC/QRPGSRC,QUSEC

I\

I\ Retrieve Job Description API Include

I\

I/COPY QSYSINC/QRPGSRC,QWDRJOBD

I\

I\

I\ Dummy data structure used to declare binary field .19/

I\

IDS

I

I

39ð

B

1

4ðRCVLEN

I

I

'JOBDð1ðð'

 

5

12FORMAT

Chapter 3. Common Information across APIs—Basic (OPM) 3-Example17

Page 69
Image 69
IBM Version 4 manual Accessing the Hold Attribute-OPM, Diagnostic Message exists Job Log Can Received