à

 

 

 

Display Messages

ð

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

System:

GENSYS9ð

 

 

Queue . . . . . :

QPGMR

 

 

Program . . . . :

\DSPMSG

 

 

Library . . . :

QUSRSYS

 

Library . . . :

 

 

 

 

Severity . . . :

ðð

 

 

Delivery . . . :

\HOLD

 

 

Type reply (if required), press Enter.

 

 

 

 

 

 

From . . . :

SMITH

ð7/23/94

1ð:56:13

 

 

 

 

Program failed with message ID CPF98ð1

 

 

 

 

 

 

 

 

 

 

 

Then

run

another

error

condition. For

this error condition, you should

the

XYZ

library

does

not

exist. Use the following call statement:

CALL JOBDAPI (QPGMR XYZ)

The output is similar to the following:

 

 

 

 

 

 

 

 

à

 

 

Display Messages

ð

 

 

 

 

 

 

 

 

 

 

 

System:

GENSYS9ð

 

Queue . . . . . :

QPGMR

 

Program . . . . :

\DSPMSG

 

Library . . . :

QUSRSYS

 

Library . . . :

 

 

 

Severity

. . . :

ðð

 

Delivery . . . :

\HOLD

 

Type reply (if required), press Enter.

 

 

 

 

From

. . . :

SMITH

ð7/23/94

1ð:56:13

 

 

 

Program failed with message ID CPF981ð

 

 

 

 

 

 

 

 

 

 

 

You should see that the CPF9810 message (Library not found) was issue advantage of the error return variable is that it can contain other as message data. The following are the changes needed to return a code structure:

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

I\

I\Program Name: JOBDAPI

I\

 

I\Language:

OPM RPG

I\

 

I\Descriptive Name: Get Job Description

I\

 

I\Description: This sample program shows the incorrect

I\

way of using the offset in a user space in RPG.

I\

 

I\Header Files Included: QUSEC - Error Code Parameter

I\

(Copied into Program)

I\

QWDRJOBD - Retrieve Job Description API

I\

 

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

I\ Error Code Parameter Include for the APIs

I\

I\ The following QUSEC include is copied into this program￿

I\ so that the variable-length field can be defined as

I\ fixed length.

I\

I\\\ START HEADER FILE SPECIFICATIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\

I\

I\Header File Name: H/QUSEC

I\

I\Descriptive Name: Error Code Parameter.

I\

I\5763-SS1 (C) Copyright IBM Corp. 1994,1994

I\All rights reserved.

I\US Government Users Restricted Rights -

I\Use, duplication or disclosure restricted

I\by GSA ADP Schedule Contract with IBM Corp.

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

Page 67
Image 67
IBM Version 4 manual Xyz, Library Does Not Exist. Use the following call statement, Call Jobdapi Qpgmr XYZ