Server API Calls

On SERVER, it is necessary to create SQUEUE at network scope. The following REXX fragment accomplishes this:
/* load API definitions */
call apiload(vmrexmtr)
call apiload(vmrexipc)

/* set up constants for QueueCreate */
qn = 'SQUEUE'
qnl = length(qn)

/* create queue */
call csl 'QueueCreate mtrc mtre qn qnl vm_ipc_nlevel qh'
say 'RC='mtrc 'RE='mtre 'creating queue' qn

Note that the queue's handle comes back in variable qh; you would use qh in a subsequent call to QueueReceiveBlock.