81 lines
3.6 KiB
HTML
81 lines
3.6 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 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>SPAWN CL command, QUSRTOOL example</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. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!--File Edited November 2001 -->
|
||
|
<!--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>
|
||
|
|
||
|
<h2>SPAWN CL command, QUSRTOOL example</h2>
|
||
|
|
||
|
<p>When you test your threaded application, you may want to quickly spawn new
|
||
|
processes and debug the programs started in those processes. An example tool
|
||
|
that creates a <strong>SPAWN</strong> CL command has been placed into the
|
||
|
<strong>QUSRTOOL</strong> library for your use on the system. (See Creating the
|
||
|
SPAWN command below.)</p>
|
||
|
|
||
|
<p>You can install the <strong>QUSRTOOL</strong> library (Option 7) of the base
|
||
|
operating system when using the <strong>RSTLICPGM</strong> CL command. On the
|
||
|
<strong>GO</strong> <strong>LICPGM</strong> menu, it appears as the Example
|
||
|
Tools Library.</p>
|
||
|
|
||
|
<p>The spawn example shows how you might write a CL command and a command
|
||
|
processing program to allow you to spawn jobs from the command line. The call
|
||
|
to <strong>spawn</strong>() starts a new process that allows you to inherit the
|
||
|
current environment (file descriptors, socket descriptors, and environment
|
||
|
variables) from the current process. By default, it allows you to create
|
||
|
threads in the child process and allows you to automatically issue the commands
|
||
|
required to debug the spawned child. If you want more functionality from the
|
||
|
command, you can easily edit it.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3><a name="286286">Creating the SPAWN command</a></h3>
|
||
|
|
||
|
<p>To use the example tool to create the SPAWN command, see the <strong>
|
||
|
QATTINFO</strong> file in the <strong>QUSRTOOL</strong> library. The members
|
||
|
<strong>AAAAREADME</strong> and <strong>AAAMAP</strong> in that file contain
|
||
|
information and instructions for unpacking various <strong>QUSRTOOL</strong>
|
||
|
examples and utilities. Read these members and follow the instructions for
|
||
|
using the package and unpackage utilities on the <strong>SPAWN</strong> source
|
||
|
files.</p>
|
||
|
|
||
|
<p>The member that contains the <strong>SPAWN</strong> example information is
|
||
|
<strong>TP0ZINFO</strong> in the <strong>QATTINFO</strong> file. The <strong>
|
||
|
TP0ZINFO</strong> member contains a table that lists the source files that must
|
||
|
be unpacked to create the <strong>SPAWN</strong> example. The <strong>
|
||
|
TP0ZINFO</strong> member also contains instructions for creating the example CL
|
||
|
command and lists which source members are used for <strong>SPAWN</strong> in
|
||
|
case you want to modify the <strong>SPAWN</strong> CL command to suit your own
|
||
|
specific needs.</p>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="rzah4mst.htm">Pthread APIs</a> | <a
|
||
|
href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|