IBM Version 4 manual Except Good Else, Except BAD END, Oqprint Good, Oqprint BAD

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 300
Image 300

C\

 

 

C

CALL

QWDRJOBD

C

PARM

QWDDð1ðð

C

PARM

RCVLEN

C

PARM

FORMAT

C

PARM

LFNAM

C

PARM

QUSEC

C\

 

 

C\ If no bytes available, API was successful; print HOLD val￿ue

C\

 

 

C

IF

QUSBAVL = ð

C

EXCEPT

GOOD

C

ELSE

 

C\

C\ If some bytes available, API failed; print Error message￿ ID

C\

 

 

 

 

C

 

IF

QUSBAVL > ð

 

C

 

EXCEPT

BAD

 

C

 

END

 

 

C

 

END

 

 

C\

 

 

 

 

C\ End of program

 

 

 

C\

 

 

 

 

C

 

EVAL

\INLR = '1'

 

C

 

RETURN

 

 

C\

 

 

 

 

C\ End of MAINLINE

 

 

 

C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

O\

 

 

 

 

OQPRINT

E

GOOD

1

6

O

 

 

 

'HOLD value - '

O

 

QWDHJQ

 

 

OQPRINT

E

BAD

1

6

O

 

 

 

'Failed. Error ID - '

O

 

QUSEI

 

 

Accessing a Field Value

(Initial Library

List)—ILE C

Example

Refer

to “Accessing

a Field Value

(Initial Library List)—OPM RPG Example”

page 3-19 for the original example.

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

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

/\

 

\/

/\Program Name:

JOBDAPI

\/

/\

 

\/

/\Programming Language:

ILE C

\/

/\

 

\/

/\Description:

This example shows how to access a field

\/

/\

value returned from a retrieve API.

\/

/\

 

\/

/\Header Files Included: STDIO - Standard Input/Output

\/

/\

STRING - String Functions

\/

/\

QUSEC - Error Code Parameter

\/

/\

QWDRJOBD - Retrieve Job Description API

\/

/\

QLIEPT - Entry Point Table

\/

/\

 

\/

B-22System API Programming V4R1

Page 300
Image 300
IBM Version 4 manual Except Good Else, Except BAD END, Oqprint Good, Oqprint BAD