161 lines
13 KiB
HTML
161 lines
13 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Examples: APIs" />
|
||
|
<meta name="abstract" content="Contains example programs that use APIs and exit programs." />
|
||
|
<meta name="description" content="Contains example programs that use APIs and exit programs." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="api.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexchnjob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexchnent.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexcremac.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexcreind.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexcredir.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexdefque.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexdelsp.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexdirep.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexgenalt.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexlisdir.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexlissub.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexsavdev.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexsavvar.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexscapat.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusapi.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusdev.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusque.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusvar.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusdata.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusterm.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexushand.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusfac.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusmem.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexustra.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusdeb.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexuspro.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexustran.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexwofil.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexcrepro.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="apiexusback.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="conQSYSINC.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="ExTaskAPIs.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="apiexmp" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Examples: APIs</title>
|
||
|
</head>
|
||
|
<body id="apiexmp"><a name="apiexmp"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Examples: APIs</h1>
|
||
|
<div><p>Contains example programs that use APIs and exit programs.</p>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> To use these examples, you will need the header files provided
|
||
|
in the QSYSINC (system include) library.</div>
|
||
|
<p>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.</p>
|
||
|
<p><img src="./delta.gif" alt="Start of change" />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. <img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
<p><img src="./delta.gif" alt="Start of change" />UNDER NO CIRCUMSTANCES IS
|
||
|
IBM, ITS PROGRAM DEVELOPERS OR SUPPLIERS LIABLE FOR ANY OF THE FOLLOWING,
|
||
|
EVEN IF INFORMED OF THEIR POSSIBILITY: <img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
<img src="./delta.gif" alt="Start of change" /><ol><li>LOSS OF, OR DAMAGE TO, DATA;</li>
|
||
|
<li>SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES, OR FOR ANY ECONOMIC CONSEQUENTIAL
|
||
|
DAMAGES; OR </li>
|
||
|
<li>LOST PROFITS, BUSINESS, REVENUE, GOODWILL, OR ANTICIPATED SAVINGS.</li>
|
||
|
</ol><img src="./deltaend.gif" alt="End of change" />
|
||
|
<p><img src="./delta.gif" alt="Start of change" />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.<img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="apiexchnjob.htm">Example: Changing an active job</a></strong><br />
|
||
|
This program will reduce the run priority of active jobs with the same name.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexchnent.htm">Example: Changing a job schedule entry</a></strong><br />
|
||
|
This program will change the user for a list of job schedule entries.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexcremac.htm">Example: Creating a batch machine</a></strong><br />
|
||
|
This program enters commands to be processed onto a queue called 'TESTQ' in Library 'QGPL'.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexcreind.htm">Example: Creating and manipulating a user index</a></strong><br />
|
||
|
This example shows how to create and manipulate a user index with a call from an MI program. For another example using the QUSCRTUI API, see Creating Your Own Telephone Directory.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexcredir.htm">Example: Creating your own telephone directory</a></strong><br />
|
||
|
This program creates a user index named 'TESTIDX' in the library 'QGPL'.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexdefque.htm">Examples: Defining queries</a></strong><br />
|
||
|
This topic includes several examples that use the Query (QQQQRY) API.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexdelsp.htm">Example: Deleting old spooled files</a></strong><br />
|
||
|
The following application program runs using the Delete Old Spooled Files (DLTOLDSPLF) command.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexdirep.htm">Example: Diagnostic reporting</a></strong><br />
|
||
|
This example program illustrates the use of the Send Nonprogram Message API, QMHSNDM, the Receive Program Message API, QMHRCVPM, and the Change Exception Message API, QMHCHGEM. The program produces a diagnostic report of errors that occur when the QMHSNDM API is used to send a message to more than one message queue.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexgenalt.htm">Example: Generating and sending an alert</a></strong><br />
|
||
|
The following ILE RPG program uses both alert APIs.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexlisdir.htm">Example: List directories</a></strong><br />
|
||
|
This program lists a directory to a spooled file. You should call this program with only one parameter, the parameter that represents the directory you want to list.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexlissub.htm">Example: Listing subdirectories</a></strong><br />
|
||
|
This program lists the subdirectories of the path passed to the program to a spooled file. You should call this program with only one parameter, the parameter that represents the directory you want to list.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexsavdev.htm">Example: Saving to multiple devices</a></strong><br />
|
||
|
This example program shows how to save a large library using more than one device at the same time.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexsavvar.htm">Example: Saving and restoring system-level environment variables</a></strong><br />
|
||
|
This two-part example illustrates how to save the current set of system-level environment variables and restore them later.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexscapat.htm">Examples: Scanning string patterns</a></strong><br />
|
||
|
These examples use the QCLSCAN API. A typical use of the QCLSCAN API is to allow the work station user to retrieve all records that contain a specified pattern.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusapi.htm">Example: Using COBOL program to call APIs</a></strong><br />
|
||
|
This example illustrates using COBOL programs to call APIs.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusdev.htm">Example: Using the control device (QTACTLDV) API</a></strong><br />
|
||
|
This example shows how the QTACTLDV (Control Device) API could be used to send a diagnostic command to a tape device.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusque.htm">Examples: Using a data queue</a></strong><br />
|
||
|
These examples explain three methods to process data queue files.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusvar.htm">Example: Using environment variables</a></strong><br />
|
||
|
This program displays the value of an environment variable and then sets the environment variable to a new value.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusdata.htm">Examples: Using ILE Common Execution Environment data APIs</a></strong><br />
|
||
|
These examples show how to call the ILE Common Execution Environment (CEE) data APIs for ILE COBOL and ILE RPG.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusterm.htm">Examples: Using the generic terminal APIs</a></strong><br />
|
||
|
These two examples illustrate programs that implement a generic terminal and a simple interpreter.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexushand.htm">Example: Using profile handles</a></strong><br />
|
||
|
This example illustrates how to generate, change, and release profile handles in a CL program.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusfac.htm">Example: Using registration facility APIs</a></strong><br />
|
||
|
This example shows how to use the registration facility in one of your programs. The example does not include any of the programs that are being called, nor does it show anything but an excerpt of the calling program.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusmem.htm">Examples: Using semaphores and shared memory</a></strong><br />
|
||
|
These two examples illustrate programs that support the client/server model.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexustra.htm">Example: Using SNA/Management services transport APIs</a></strong><br />
|
||
|
This example shows a source and target application using network management transport APIs to send and receive management services data. The example compiles in ILE C.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusdeb.htm">Example: Using source debugger APIs</a></strong><br />
|
||
|
The ILE source debugger APIs allow an application developer to write a debugger for ILE programs.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexuspro.htm">Examples: Using the spawn process and wait for child process APIs</a></strong><br />
|
||
|
These two examples illustrate programs that use a parent/child relationship.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexustran.htm">Example: Using the user-defined communications programs for file transfer</a></strong><br />
|
||
|
This example shows how X.25-oriented applications use the user-defined communications support to connect to remote systems.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexwofil.htm">Example: Working with stream files</a></strong><br />
|
||
|
This ILE C program opens an existing stream file, creates or replaces a database file, reads from the stream file and writes to the database file until end-of-file, and closes both files.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexcrepro.htm">Example: Creating a program temporary fix exit program</a></strong><br />
|
||
|
This example creates a program temporary fix exit program.</li>
|
||
|
<li class="ulchildlink"><strong><a href="apiexusback.htm">Example: Using the operational assistant exit program for operational assistant backup</a></strong><br />
|
||
|
This example contains a user-written exit program for doing Operational Assistant backup.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="api.htm">Application programming interfaces</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="conQSYSINC.htm" title="The QSYSINC (system include) library provides all source includes for APIs shipped with i5/OS.">Include files and the QSYSINC library</a></div>
|
||
|
<div><a href="ExTaskAPIs.htm" title="This topic provides some examples of using APIs to perform different types of tasks.">Performing tasks using APIs</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|