This scenario demonstrates the use of an original program model (OPM) API in several different programs.
These examples focus on descriptions, formats, variable-length fields as output, and optional parameters. This scenario accesses information from a job description to demonstrate how to code APIs. While this may not be what your application requires, you can use the same approach to access information when you use most of the APIs.
Assume that you are interested in accessing the value of the hold parameter on the Retrieve Job Description (RTVJOBD) command. The hold parameter determines whether the job is held on the job queue. Two values are supported:
*NO The job is not held.
*YES The job is held on the job queue.
The first step is to find the correct API to use. To do this, you must identify the part of the i5/OS™program that is most closely related to the function in which you are interested. If you want to access information from a job description, as in our scenario, you should know that a job description object is considered part of the work management function.
API names contain verbs that are similar to the i5/OS licensed program: change, create, remove, and retrieve. For a complete list of verbs, see OPM and ILE API verbs and abbreviations.
These examples use the Retrieve Job Description Information (QWDRJOBD) API.
For a detailed description of how to use the API, use information in API information format.
IBM® grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.
SUBJECT TO ANY STATUTORY WARRANTIES WHICH CANNOT BE EXCLUDED, IBM, ITS PROGRAM DEVELOPERS AND SUPPLIERS MAKE NO WARRANTIES OR CONDITIONS EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, REGARDING THE PROGRAM OR TECHNICAL SUPPORT, IF ANY.
UNDER NO CIRCUMSTANCES IS IBM, ITS PROGRAM DEVELOPERS OR SUPPLIERS LIABLE FOR ANY OF THE FOLLOWING, EVEN IF INFORMED OF THEIR POSSIBILITY:
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO SOME OR ALL OF THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.