In this installment of APIs by Example, Carsten Flensburg demonstrates how to create a command definition for the Create User Queue (QUSCRTUQ) API. The result is a CRTUSRQ command that you can easily use in your CL programs. This command’s counterpart, the DLTUSRQ command, comes with OS/400 and does not need to be created manually.
Creating a command definition for an API is a useful technique because it adds syntax checking and self-documentation to the parameters for the API. It also makes it very easy to use the API in a CL program.
In the next installment of APIs by Example on February 19, Carsten will demonstrate how to use MI built-in functions and functions from the ILE C runtime library to work with user queues in an ILE RPG program.