Cᑍ Initialize the error code parameter. To signal exceptions to
Cᑍ this program by the API, you need to set the bytes provided
Cᑍ field of the error code to zero. Because this program has
Cᑍ exceptions sent back through the error code parameter, it 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 processing
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 1
C PARM 'QUEUELIB'LIBNAM 1
C PARM 1 MSGSZ 5
C PARM 'EXAMPLE' MSG 1
Cᑍ
Cᑍ Retrieve information from the data queue.
Cᑍ
C CALL 'QRCVDTAQ'
C PARM 'EXAMPLEQ'QUENAM 1
C PARM 'QUEUELIB'LIBNAM 1
C PARM 1 MSGSZ 5
C PARM MSGBCK 1
C PARM WAITTM 5
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