241 lines
7.9 KiB
HTML
241 lines
7.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Call Job Interrupt Program Exit Program</title>
|
|
<!-- Begin Header Records -->
|
|
<!-- 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. -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<!-- Java sync-link -->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<a name="Top_Of_Page"></a>
|
|
|
|
<h2><img src="delta.gif" alt="Start of change">Call Job Interrupt Program Exit Program</h2>
|
|
|
|
<div class="box" style="width: 85%;">
|
|
<br>
|
|
Required Parameter Group:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Exit program data</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Length of exit program data</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br>
|
|
Exit Point Name: QIBM_QWC_JOBITPPGM<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Exit Point Format Name: JITP0100<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>
|
|
The Call Job Interrupt Program exit program is indirectly called by the
|
|
<a href="./qwcjbitp.htm">Call Job Interrupt Program (QWCJBITP) API</a>.
|
|
The QWCJBITP API is used to interrupt a specified target job to run a user-written program.
|
|
</p>
|
|
|
|
<p>
|
|
The user-written program is not called if any of the following conditions are true:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>The program has not been added to the registration facility for the
|
|
QIBM_QWC_JOBITPPGM exit point.</li>
|
|
|
|
<li>The target job is in initiation or termination phase.</li>
|
|
|
|
<li>The target job is a system job, subsystem monitor job, spool reader job, or
|
|
a spool writer job.</li>
|
|
|
|
<li>The Allow jobs to be interrupted (QALWJOBITP) system value is set to
|
|
'0'.</li>
|
|
|
|
<li>The target job has been set to an uninterruptible status when becoming
|
|
active or via the <a href="./qwccjitp.htm">Change Job Interrupt Status
|
|
(QWCCJITP) API</a>.</li>
|
|
</ul>
|
|
|
|
<p>
|
|
Before the user-written exit program is run, the user profile of the initial thread of the target job is swapped to the user profile of the caller of the Call Job Interrupt Program (QWCJBITP) API. After the user-written exit program completes either due to normal exit conditions or due to an error, the user profile of the initial thread of the target job will be swapped back. In the case where the user profile of the initial thread of the target job can not be swapped back, the initial thread of the target job will continue to run under the user profile of the caller of the Call Job Interrupt Program (QWCJBITP) API.
|
|
</p>
|
|
|
|
<p>
|
|
This exit point supports any number of exit programs. (For information about adding an exit program to an exit point, see the <a href="reg1.htm">Registration Facility APIs</a>.)
|
|
</p>
|
|
|
|
<p><strong>Notes:</strong></p>
|
|
|
|
<ol>
|
|
<li>While the program is running in the initial thread of the target job, other
|
|
threads in the target job are still running. Care should be taken to ensure
|
|
that the program to run in the initial thread is threadsafe. To help ensure
|
|
that a program runs in a multithreaded job, the program should be registered as
|
|
Threadsafe: *YES and Multithreaded job action: *RUN. See the <a href=
|
|
"../cl/addexitpgm.htm">Add Exit Program (ADDEXITPGM) command</a> or the <a
|
|
href="qusaddep.htm">Add Exit Program (QUSADDEP, QusAddExitProgram) APIs</a>
|
|
for more information on properly adding threadsafe programs to the registration
|
|
facility.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The program should not be a long running program so as to limit the amount
|
|
of time that the target job is interrupted.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Programs cannot use the Set ASP Group (SETASPGRP) command to change the
|
|
job's library name space. Programs called by the API must reside in *SYSBAS.
|
|
The library containing the program does not need to be in the library list of
|
|
the target job.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>When the called program refers to objects being modified by the target job,
|
|
the data may be in an indeterminate state. Access control mechanisms such as
|
|
object locks are often scoped to the job or scoped to the thread. The program
|
|
will have access to data that is being modified by the thread this program
|
|
interrupts.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Programs called by this API are responsible for releasing any system and
|
|
job resources they obtain. This includes such things as releasing any locks
|
|
obtained by the program, freeing any storage allocated by the program, and
|
|
closing any files opened by the program.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Programs called by this API should not change the environment of the target
|
|
job or the environment of the system. Some examples of things not to do include
|
|
changing the library list of the target job, issuing the Change Job (CHGJOB)
|
|
command, or changing environment variables.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Typically anything that can already be done to the target job from a
|
|
separate job should not be done by any program called from this API.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>If the exit program encounters an error during processing, no error
|
|
indicators are returned to the Call Job Interrupt Program (QWCJBITP) API or to
|
|
the source job.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The user-written exit program will not inherit any authority from the
|
|
programs that were interrupted and will gain no authority from the user profile
|
|
governing thread execution before the interrupt occurs.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<p>
|
|
A user must have all object (*ALLOBJ) and security administrator (*SECADM ) special authorities
|
|
to add exit programs to the registration facility or to remove exit programs from the registration facility.
|
|
</p>
|
|
|
|
<br>
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Exit program data</strong></dt>
|
|
<dd>INPUT; CHAR(*)
|
|
<p>
|
|
The data that is passed to the exit program. Pointer tags will not be preserved. If the length of exit program data is zero, this parameter will contain one byte that is set to binary zero.
|
|
</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of exit program data</strong></dt>
|
|
<dd>INPUT; BINARY(4)
|
|
<p>
|
|
The length of the data sent to the exit program.
|
|
</p>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Security Related Considerations</h3>
|
|
|
|
<ul>
|
|
<li>Programs added to the exit point could send a request message to *EXT. The
|
|
request message will be executed as a command at a later time in a batch job or
|
|
in an interactive job if and when a command entry screen is displayed.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The exit program could create a new message queue and set it to have a
|
|
break handling program. The exit program could also set an existing message
|
|
queue to have a break handling program. Then from another job, messages could
|
|
be sent to that message queue to cause the break handling program to run.
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The exit program could access QTEMP. It could add objects to QTEMP, rename
|
|
objects, delete objects, and clear QTEMP. It could also move or copy objects
|
|
out of QTEMP to another library. Some of these operations could cause problems
|
|
for parts of the operating system or an application that is using an object in
|
|
QTEMP.</li>
|
|
</ul>
|
|
|
|
<br>
|
|
<img src="deltaend.gif" alt="End of change">
|
|
|
|
<hr>
|
|
Exit program introduced: V5R4
|
|
<hr>
|
|
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> |
|
|
<a href="wm1.htm">Work Management APIs</a> | <a href="aplist.htm">APIs by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|