C\ Initialize the error code parameter. To

signal exceptions to

 

C\ this program by the API, you need

to set

the bytes provide￿d

 

C\ field of the error code

to zero.

Because this program has

 

C\ exceptions sent back through the error code parameter, i￿t sets

 

C\ the bytes provided field to the number of bytes it gives￿ the

 

C\ API for the parameter.

 

 

 

 

C\

 

 

 

 

 

C

Z-ADD16

QUSBNB

 

 

C\

 

 

 

 

 

C\ Initialize QCAPCMD options control block

for CL proces￿sing

 

C\

 

 

 

 

 

C

Z-ADDð

QCABCB

 

 

C

MOVE

'ð'

QCABCC

 

 

C

MOVE

'ð'

QCABCD

 

 

C

MOVE

'ð'

QCABCF

 

 

C

MOVE

\BLANKS

QCABCG

 

 

C

MOVE

\LOVAL

QCABCH

 

 

C\

 

 

 

 

 

C\ Create library QUEUELIB

 

 

 

 

C\

 

 

 

 

 

C

MOVELCRTLIB

CMDSTR

 

 

C

Z-ADD2ð

LENSTR

 

 

C\

 

 

 

 

 

C

EXSR

EXCCMD

 

 

 

C\

 

 

 

 

 

C\ Create a data queue called EXAMPLEQ in library QUEUELIB￿. The

 

C\ queue will have a maximum entry length set at 1ð, and will￿ be

 

C\ FIFO (first-in first-out).

 

 

 

C\

 

 

 

 

 

C

MOVELCRTDQ

CMDSTR

 

 

C

Z-ADD42

LENSTR

 

 

C\

 

 

 

 

 

C

EXSR

EXCCMD

 

 

 

C\

 

 

 

 

 

C\ Send information to the

data queue.

 

 

C\

 

 

 

 

 

C

CALL

'QSNDDTAQ'

 

 

 

C

PARM

'EXAMPLEQ'QUENAM

 

C

PARM

'QUEUELIB'LIBNAM

 

C

PARM

MSGSZ

 

C

PARM

'EXAMPLE'

MSG

 

C\

 

 

 

 

 

C\ Retrieve information from the data queue.

 

 

C\

 

 

 

 

 

C

CALL

'QRCVDTAQ'

 

 

 

C

PARM

'EXAMPLEQ'QUENAM

 

C

PARM

'QUEUELIB'LIBNAM

 

C

PARM

MSGSZ

 

C

PARM

 

MSGBCK

 

C

PARM

ð

WAITTM

 

C\

 

 

 

 

 

C\ Display the returned message

 

 

 

C\

 

 

 

 

 

C

DSPLY

 

MSGBCK

 

 

C\

 

 

 

 

 

C\ Delete the data queue

 

 

 

 

C\

 

 

 

 

 

C

MOVELDLTDQ

CMDSTR

 

B-170

System API Programming

V4R1

 

 

 

Page 448
Image 448
IBM Version 4 manual 170