ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qp2term.htm

233 lines
6.4 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!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>QP2TERM()--Run an i5/OS PASE Terminal Session</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 -->
<!-- Edited by Kersten Jan 02 -->
<!-- Created by V2DCIJB on 23 Nov 1999 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>QP2TERM()--Run an i5/OS PASE Terminal Session</h2>
<div class="box" style="width: 50%;">
<br>
&nbsp;&nbsp;Syntax
<pre>
#include &lt;qp2term.h&gt;
void QP2TERM(...);
</pre>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The QP2TERM() program runs an interactive terminal session that starts a
batch job to run an i5/OS Portable Application Solutions Environment (i5/OS
PASE) program. This program uses the workstation display in the interactive to
present output and accept input for files stdin, stdout, and stderr in the
batch job.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>argument strings</strong></dt>
<dd>(Input) Optional pointers to null-terminated character strings that specify
the path name of the i5/OS PASE program to run and any argument strings to
pass to the program. If no parameters are specified, QP2TERM runs the default
i5/OS PASE shell as an interactive login shell. The default i5/OS PASE shell
is an implementation of the Korn shell, with path name /QOpenSys/usr/bin/sh.
<p><strong>Note:</strong> When calling QP2TERM from CL, be sure to quote any
argument string that could be interpreted as a numeric value. CL converts
unquoted numeric arguments to decimal or floating-point format, which does not
match the assumption made by QP2TERM and i5/OS PASE programs that all
arguments are null-terminated character strings.</p>
</dd>
</dl>
<br>
<h3>Authorities</h3>
<table border cellpadding="5">
<!-- cols="80 20" -->
<tr>
<th align="left" valign="bottom">Object Referred to</th>
<th align="center" valign="bottom">Authority<br>
Required</th>
</tr>
<tr>
<td align="left" valign="top">Each directory in the path to the i5/OS PASE
program and shared libraries</td>
<td align="center" valign="top">*X</td>
</tr>
<tr>
<td align="left" valign="top">i5/OS PASE program (not a shell script) in a
local file system</td>
<td align="center" valign="top">*X</td>
</tr>
<tr>
<td align="left" valign="top">i5/OS PASE program in a remote file system or
shell script</td>
<td align="center" valign="top">*RX</td>
</tr>
<tr>
<td align="left" valign="top">i5/OS PASE shared library</td>
<td align="center" valign="top">*R</td>
</tr>
</table>
<br>
<br>
<h3>Return Value</h3>
<p>QP2TERM returns no function result. Escape messages are sent to report
errors.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPFB9C4 E</td>
<td width="85%" valign="top">Error running i5/OS PASE terminal session, reason
code &amp;1, errno &amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPFB9C9 E</td>
<td align="left" valign="top">Terminal session already in use.</td>
</tr>
<tr>
<td align="left" valign="top">CPFB9CA E</td>
<td align="left" valign="top">Batch job ended in error.</td>
</tr>
</table>
<br><br>
<h3>Usage Notes</h3>
<ol>
<li>QP2TERM uses the Qp0zStartTerminal API to manage the interactive display
and start a batch job. The batch job copies most attributes of the interactive
job and calls program QP2SHELL to run the i5/OS PASE program. See <a href=
"qp2shell.htm">QP2SHELL()--Run an i5/OS PASE Shell Program</a> for details
about running an i5/OS PASE shell program.<br>
<br>
</li>
<li>QP2TERM copies all ILE environment variables from the interactive job to
the batch job before starting the batch job, except the following ILE
environment variables, which are set or replaced in the batch job. These
changes affect the batch job only. They do not modify the environment in the
job that called QP2TERM.<br>
<br>
<table cellpadding="5">
<!-- cols="35 65" -->
<tr>
<td width="15%" valign="top"><em>COLUMNS</em></td>
<td width="85%" valign="top">If COLUMNS is not already set, QP2TERM sets it to
the number of columns available for program output on the interactive
display.</td>
</tr>
<tr>
<td align="left" valign="top"><em>ROWS</em></td>
<td align="left" valign="top">If ROWS is not already set, QP2TERM sets it to
the number of rows available for program output on the interactive
display.</td>
</tr>
<tr>
<td align="left" valign="top"><em>QIBM_USE_DESCRIPTOR_STDIO=I</em></td>
<td align="left" valign="top">QP2TERM sets QIBM_USE_DESCRIPTOR_STDIO to ensure
that files stdin, stdout, and stderr use Integrated File System descriptors 0,
1, and 2. The terminal session manager attaches open pipes to these file
descriptors in the batch job.</td>
</tr>
<tr>
<td align="left" valign="top" nowrap><em>QIBM_PASE_DESCRIPTOR_STDIO=T</em></td>
<td align="left" valign="top">QP2TERM sets QIBM_PASE_DESCRIPTOR_STDIO to ensure
that i5/OS PASE runtime does ASCII/EBCDIC text conversion for data that the
i5/OS PASE program reads or writes to files stdin, stdout, and stderr.</td>
</tr>
</table>
</li>
</ol>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="startrml.htm">Qp0zStartTerminal()--Start a Terminal
Session</a><br>
<br>
</li>
<li><a href="qp2shell.htm">QP2SHELL()--Run an i5/OS PASE Shell
Program</a></li>
</ul>
<br>
<hr>
API introduced: V4R5
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"pase1.htm">i5/OS PASE APIs</a> | <a href="aplist.htm">APIs by category</a>
</td>
</tr>
</table>
</center>
</body>
</html>