IBM Version 4 Universal Remote User Manual


 
ᑍ Send information to the data queue.
CALL "QSNDDTAQ" USING NAME-OF-QUEUE, NAME-OF-LIBRARY,
SIZE-OF-MSG, MSG.
ᑍ Retrieve information from the data queue.
CALL "QRCVDTAQ" USING NAME-OF-QUEUE, NAME-OF-LIBRARY,
SIZE-OF-MSG, MSG-BACK, WAIT-TIME.
ᑍ Display the returned message
DISPLAY MSG-BACK.
ᑍ Delete the data queue
CALL QCAPCMD USING DLTDQ, COMMAND-LENGTH, QCA-PCMD-CPOP1,
OPTIONS-SIZE, FORMAT-NAME, RECEIVER,
RECEIVER-LENGTH, RECEIVER-LENGTH, QUS-EC.
ᑍ If an exception occurs, the API returns the exception in the
ᑍ error code parameter. The bytes available field is set to
ᑍ zero if no exception occurs and greater than zero if an
ᑍ exception does occur.
IF BYTES-AVAILABLE >  PERFORM ERROR-FOUND.
ᑍ Delete the library
CALL QCAPCMD USING DLTLIB, COMMAND-LENGTH, QCA-PCMD-CPOP1,
OPTIONS-SIZE, FORMAT-NAME, RECEIVER,
RECEIVER-LENGTH, RECEIVER-LENGTH, QUS-EC.
ᑍ If an exception occurs, the API returns the exception in the
ᑍ error code parameter. The bytes available field is set to
ᑍ zero if no exception occurs and greater than zero if an
ᑍ exception does occur.
IF BYTES-AVAILABLE >  PERFORM ERROR-FOUND.
STOP RUN.
ᑍ End of MAINLINE
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ERROR-FOUND.
ᑍ Process errors returned from the API.
ᑍ If first error found, then open QPRINT ᑍPRTF
IF FIRST-ERROR = "" OPEN OUTPUT LISTING,
MOVE "1" TO FIRST-ERROR.
B-168 System API Programming V4R1