154 lines
7.0 KiB
HTML
154 lines
7.0 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="Example in OPM RPG: Remove exit program and deregister exit point" />
|
||
|
<meta name="abstract" content="This program removes an exit program and deregisters an exit point from the registration facility." />
|
||
|
<meta name="description" content="This program removes an exit program and deregisters an exit point from the registration facility." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="ileScenario.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="ileRemoveRPG" />
|
||
|
<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>Example in OPM RPG: Remove exit program and deregister exit point</title>
|
||
|
</head>
|
||
|
<body id="ileRemoveRPG"><a name="ileRemoveRPG"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Example in OPM RPG: Remove exit program and deregister exit point</h1>
|
||
|
<div><p>This program removes an exit program and deregisters an exit point
|
||
|
from the registration facility.</p>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> Read the <a href="codedisclaimer.htm">Code license and disclaimer information</a> for important
|
||
|
legal information.</div>
|
||
|
<pre> F***************************************************************
|
||
|
F***************************************************************
|
||
|
F*
|
||
|
F* Program: Remove an Exit Program
|
||
|
F* Deregister an Exit Point
|
||
|
F*
|
||
|
F* Language: OPM RPG
|
||
|
F*
|
||
|
F* Description: This program removes an exit program and
|
||
|
F* deregisters an exit point from the registration
|
||
|
F* facility.
|
||
|
F*
|
||
|
F* APIs Used: QUSRMVEP - Remove Exit Program
|
||
|
F* QUSDRGPT - Deregister Exit Point
|
||
|
F*
|
||
|
F***************************************************************
|
||
|
F***************************************************************
|
||
|
F*
|
||
|
FQPRINT O F 132 PRINTER UC
|
||
|
I*
|
||
|
I* Error Code parameter include. As this sample program
|
||
|
I* uses /COPY to include the error code structure, only the first
|
||
|
I* 16 bytes of the error code structure are available. If the
|
||
|
I* application program needs to access the variable length
|
||
|
I* exception data for the error, the developer should physically
|
||
|
I* copy the QSYSINC include and modify the copied include to
|
||
|
I* define additional storage for the exception data.
|
||
|
I*
|
||
|
I/COPY QSYSINC/QRPGSRC,QUSEC
|
||
|
I*
|
||
|
I*
|
||
|
I* Miscellaneous data
|
||
|
I*
|
||
|
I DS
|
||
|
I B 1 40PGMNBR
|
||
|
I I 'EXAMPLE_EXIT_POINT ' 5 24 EPNTNM
|
||
|
C*
|
||
|
C* Beginning of mainline
|
||
|
C*
|
||
|
C* Remove an exit program from the exit point and then deregister
|
||
|
C* the exit point. It is not necessary to remove exit programs
|
||
|
C* from an exit point before deregistering the exit point. It is
|
||
|
C* done here only for illustrative purposes.
|
||
|
C*
|
||
|
C* Initialize the error code parameter. To signal exceptions to
|
||
|
C* this program by the API, you need to set the bytes provided
|
||
|
C* field of the error code to zero. Because this program has
|
||
|
C* exceptions sent back through the error code parameter, it sets
|
||
|
C* the bytes provided field to the number of bytes it gives the
|
||
|
C* API for the parameter.
|
||
|
C*
|
||
|
C Z-ADD16 QUSBNB
|
||
|
C*
|
||
|
C* Call the API to remove the exit program.
|
||
|
C*
|
||
|
C CALL 'QUSRMVEP'
|
||
|
C PARM EPNTNM
|
||
|
C PARM 'EXMP0100'FORMAT 8
|
||
|
C PARM 1 PGMNBR
|
||
|
C PARM QUSBN
|
||
|
C*
|
||
|
C* If an exception occurs, the API returns the exception in the
|
||
|
C* error code parameter. The bytes available field is set to
|
||
|
C* zero if no exception occurs and greater than zero if an
|
||
|
C* exception does occur.
|
||
|
C*
|
||
|
C QUSBNC IFGT 0
|
||
|
C OPEN QPRINT
|
||
|
C EXCPTERRPGM
|
||
|
C EXSR DONE
|
||
|
C ENDIF
|
||
|
C*
|
||
|
C* If the call to remove the exit program is successful,
|
||
|
C* deregister the exit point.
|
||
|
C*
|
||
|
C* Call the API to deregister the exit point.
|
||
|
C*
|
||
|
C CALL 'QUSDRGPT'
|
||
|
C PARM EPNTNM
|
||
|
C PARM 'EXMP0100'FORMAT
|
||
|
C PARM QUSBN
|
||
|
C*
|
||
|
C* If an exception occurs, the API returns the exception in the
|
||
|
C* error code parameter. The bytes available field is set to
|
||
|
C* zero if no exception occurs and greater than zero if an
|
||
|
C* exception does occur.
|
||
|
C*
|
||
|
C QUSBNC IFGT 0
|
||
|
C OPEN QPRINT
|
||
|
C EXCPTERREPT
|
||
|
C EXSR DONE
|
||
|
C ENDIF
|
||
|
C EXSR DONE
|
||
|
C*
|
||
|
C* End of MAINLINE
|
||
|
C*
|
||
|
C*
|
||
|
C* Return to programs caller
|
||
|
C DONE BEGSR
|
||
|
C SETON LR
|
||
|
C RETRN
|
||
|
C ENDSR
|
||
|
O*
|
||
|
OQPRINT E 106 ERREPT
|
||
|
O 'Attempt to deregister '
|
||
|
O 'exit point failed: '
|
||
|
O QUSBND
|
||
|
OQPRINT E 106 ERRPGM
|
||
|
O 'Attempt to remove exit '
|
||
|
O 'program failed: '
|
||
|
O QUSBND</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ileScenario.htm" title="The example APIs in this section represent two general functions of APIs--change and retrieve.">Scenario: Integrated Language Environment (ILE) APIs</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|