161 lines
4.6 KiB
HTML
161 lines
4.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>Qp0zInitEnv()--Initialize Environment for Variables</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 -->
|
||
|
<!-- Direct1 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
||
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
||
|
<!-- This file has undergone html cleanup on 04/29/02 by JET -->
|
||
|
<!-- 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>Qp0zInitEnv()--Initialize Environment for Variables</h2>
|
||
|
|
||
|
<div class="box" style="width: 60%;">
|
||
|
<br>
|
||
|
Syntax
|
||
|
|
||
|
<pre>
|
||
|
#include <qp0z1170.h>
|
||
|
|
||
|
int Qp0zInitEnv(void);;
|
||
|
</pre>
|
||
|
|
||
|
Service Program Name: QP0ZCPA<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>Qp0zInitEnv()</strong> function sets the external variable
|
||
|
<samp>environ</samp> to a pointer to the current environment list. (On the
|
||
|
iSeries server, <samp>environ</samp> is initialized to NULL when an activation
|
||
|
group is started.)</p>
|
||
|
|
||
|
<p><strong>Note:</strong> Although it is possible for a user's program to
|
||
|
directly read the <samp>environ</samp> array, use of the <strong>
|
||
|
getenv()</strong> or <strong>Qp0zGetEnv()</strong> functions is
|
||
|
recommended.<br>
|
||
|
</p>
|
||
|
|
||
|
<br>
|
||
|
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
|
||
|
<!-- Instead, use the commented out coding below to indicate NONE. -->
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<!-- Use this if there are no authorities and locks. -->
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="5 95" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>0</em></td>
|
||
|
<td align="left" valign="top"><strong>Qp0zInitEnv()</strong> successfully
|
||
|
initialized the environment.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>-1</em></td>
|
||
|
<td align="left" valign="top"><strong>Qp0zInitEnv()</strong> was not
|
||
|
successful. The <em>errno</em> variable is set to indicate the error.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>If <strong>Qp0zInitEnv()</strong> is not successful, <em>errno</em>
|
||
|
indicates the following error.</p>
|
||
|
|
||
|
<dl compact>
|
||
|
<dt><em>[EUNKNOWN]</em></dt>
|
||
|
|
||
|
<dd>
|
||
|
<p>Unknown system state.</p>
|
||
|
|
||
|
<p>The operation failed because of an unknown system state. See any messages in
|
||
|
the job log and correct any errors that are indicated, then retry the
|
||
|
operation.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li>The <<strong>qp0z1170.h</strong>> file (see <a href="unix13.htm">
|
||
|
Header Files for UNIX-Type Functions</a>)</li>
|
||
|
|
||
|
<li><a href="evgetenv.htm">getenv()</a>--Get Value of Environment Variable</li>
|
||
|
|
||
|
<li><a href="evputenv.htm">putenv()</a>--Change or Add Environment
|
||
|
Variable</li>
|
||
|
|
||
|
<li><a href="evdltenv.htm">Qp0zDltEnv()</a>--Delete an Environment
|
||
|
Variable</li>
|
||
|
|
||
|
<li><a href="evdltsev.htm">Qp0zDltSysEnv()</a>--Delete a System-Level
|
||
|
Environment Variable</li>
|
||
|
|
||
|
<li><a href="evgetall.htm">Qp0zGetAllSysEnv()</a>--Get All System-Level
|
||
|
Environment Variables</li>
|
||
|
|
||
|
<li><a href="evgenvxt.htm">Qp0zGetEnv()</a>--Get Value of Environment Variable
|
||
|
(Extended)</li>
|
||
|
|
||
|
<li><a href="evgetsev.htm">Qp0zGetSysEnv()</a>--Get Value of System-Level
|
||
|
Environment Variable</li>
|
||
|
|
||
|
<li><a href="evpenvxt.htm">Qp0zPutEnv()</a>--Change or Add Environment Variable
|
||
|
(Extended)</li>
|
||
|
|
||
|
<li><a href="evputsev.htm">Qp0zPutSysEnv()</a>--Change or Add a System-Level
|
||
|
Environment</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V3R6
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|