"ᑍUSER ", /ᑍ Domain of user queue ᑍ/
"ᑍNO "); /ᑍ Allow pointer data ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ If an exception occurred, the API would have returned the ᑍ/
/ᑍ exception in the error code parameter. The bytes available ᑍ/
/ᑍ field will be set to zero if no exception occurred and greater ᑍ/
/ᑍ than zero if an exception did occur. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
if (error_code.ec_fields.Bytes_Available > )
{
printf("ATTEMPT TO CREATE A USER QUEUE FAILED WITH EXCEPTION:%.7s",
error_code.ec_fields.Exception_Id);
exit(1);
}
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Send information to the queue. ᑍ/
/ᑍ ᑍ/
/ᑍ We will need to use MI instructions to accomplish this. ᑍ/
/ᑍ There are three steps that must be done: ᑍ/
/ᑍ ᑍ/
/ᑍ 1. Resolve a system pointer to the library containing the user ᑍ/
/ᑍ queue object. ᑍ/
/ᑍ 2. Using the system pointer to the library, resolve a system ᑍ/
/ᑍ pointer to user queue object in the library. ᑍ/
/ᑍ 3. Enqueue the entry using the system pointer for the user ᑍ/
/ᑍ queue. ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ First we must resolve to library QUEUELIB. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
memset(rslvsp_template.Obj.Name,' ',3);
memcpy(rslvsp_template.Obj.Name,"QUEUELIB",8);
rslvsp_template.Obj.Type_Subtype = _Library; /ᑍ found in milib.h ᑍ/
rslvsp_template.Auth = _AUTH_NONE; /ᑍ found in milib.h ᑍ/
_RSLVSP6(&queuelib_sysptr, /ᑍ system pointer to be set ᑍ/
&rslvsp_template, /ᑍ resolve template ᑍ/
&rslvsp_template.Auth); /ᑍ authority to set in sysptr ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ We can now resolve to the user queue object. We will pass the ᑍ/
/ᑍ system pointer to library QUEUELIB to RSLVSP so the resolve ᑍ/
/ᑍ will only search library QUEUELIB for the user queue object. ᑍ/
/ᑍ This is necessary so that we ensure that we are using the ᑍ/
/ᑍ correct object. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
memset(rslvsp_template.Obj.Name,' ',3);
memcpy(rslvsp_template.Obj.Name, "EXAMPLEQ", 8);
rslvsp_template.Obj.Type_Subtype = _Usrq; /ᑍ found in milib.h ᑍ/
rslvsp_template.Auth = _AUTH_ALL; /ᑍ found in milib.h ᑍ/
_RSLVSP8(&user_queue_obj_sysptr, /ᑍ system pointer to be set ᑍ/
&rslvsp_template, /ᑍ resolve template ᑍ/
A-20 System API Programming V4R1