IBM Version 4 Universal Remote User Manual


 
Cᑍ Beginning of mainline
C
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 EVAL QUSBPRV = %SIZE(QUSEC)
C
Cᑍ Initialize QCAPCMD options control block for CL processing
C
C EVAL QCACMDPT = 
C EVAL QCABCSDH = ''
C EVAL QCAPA = ''
C EVAL QCACMDSS = ''
C EVAL QCAMK = ᑍBLANKS
C EVAL QCAERVED = ᑍLOVAL
C
Cᑍ Create library QUEUELIB
C
C EVAL CMD_STR = CRTLIB
C EVAL LEN_STR = %SIZE(CRTLIB)
C
C EXSR EXEC_CMD
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 EVAL CMD_STR = CRTDQ
C EVAL LEN_STR = %SIZE(CRTDQ)
C
C EXSR EXEC_CMD
C
Cᑍ Send information to the data queue.
C
C CALL 'QSNDDTAQ'
C PARM 'EXAMPLEQ ' NAME_OF_Q 1
C PARM 'QUEUELIB ' NAME_OF_LB 1
C PARM 1 MSG_SZ 5 
C PARM 'EXAMPLE ' MSG 1
C
Cᑍ Retrieve information from the data queue.
C
C CALL 'QRCVDTAQ'
C PARM 'EXAMPLEQ ' NAME_OF_Q
C PARM 'QUEUELIB ' NAME_OF_LB
C PARM 1 MSG_SZ
C PARM MSG_BACK 1
C PARM WAIT_TIME 5 
C
Cᑍ Display the returned message
C
C DSPLY MSG_BACK
C
Cᑍ Delete the data queue
Appendix B. Original Examples in Additional Languages B-173