123 lines
6.5 KiB
HTML
123 lines
6.5 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="task" />
|
||
|
<meta name="DC.Title" content="User-defined servers" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzam3kickoff" />
|
||
|
<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>User-defined servers</title>
|
||
|
</head>
|
||
|
<body id="rzam3kickoff"><a name="rzam3kickoff"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">User-defined servers</h1>
|
||
|
<div><div class="section"><p>User-defined servers allow you to add custom servers to the iSeries™ server.
|
||
|
This capability enables you to perform administrative tasks, such as stopping,
|
||
|
starting, and monitoring servers, in the same way as you administer servers
|
||
|
that are included on the iSeries server.</p>
|
||
|
<p>The <span class="uicontrol">User-Defined
|
||
|
Servers wizard</span> allows you to define servers to be integrated with
|
||
|
the iSeries server
|
||
|
applications. The wizard requires the following information about a user-defined
|
||
|
server:</p>
|
||
|
<ul><li>Name</li>
|
||
|
<li>Description</li>
|
||
|
<li>Server job type</li>
|
||
|
<li>Program name</li>
|
||
|
<li>Server ID</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div></div><div class="nested1" xml:lang="en-us" id="accessuserdefinedserversnav"><a name="accessuserdefinedserversnav"><!-- --></a><h2 class="topictitle2">Access user-defined servers</h2>
|
||
|
<div><div class="section">To create, view, or manage user-defined servers in iSeries Navigator,
|
||
|
follow these steps:</div>
|
||
|
<ol><li><span>In <span class="uicontrol">iSeries Navigator</span>, expand <span class="menucascade"><span class="uicontrol">your iSeries server</span> > <span class="uicontrol">Network</span> > <span class="uicontrol">Servers</span> > <span class="uicontrol">User-Defined</span></span>.</span></li>
|
||
|
<li><span>To create a new server, right-click <span class="uicontrol">User-Defined</span> and
|
||
|
select <span class="uicontrol">New Server</span>.</span></li>
|
||
|
<li><span>To view or change properties of an existing server, right-click
|
||
|
the server and click <span class="uicontrol">Properties</span>.</span></li>
|
||
|
</ol>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> <img src="./delta.gif" alt="Start of change" />To add, change, or remove a user-defined server,
|
||
|
you need *IOSYSCFG special authority. To start or stop a user-defined server,
|
||
|
you need *ALLOBJ special authority or specific authority to the STRTCPSVR
|
||
|
or ENDTCPSVR commands.<img src="./deltaend.gif" alt="End of change" /></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="nested1" xml:lang="en-us" id="makejobappearserverjobiniseriesnav"><a name="makejobappearserverjobiniseriesnav"><!-- --></a><h2 class="topictitle2">Make the job appear as a server job</h2>
|
||
|
<div><div class="section"><p>You can use the <a href="../apis/qwtchgjb.htm">Change Job (QWTCHGJB) API</a> to set the server job type
|
||
|
for a server that is configured in iSeries Navigator. After you have configured
|
||
|
the application's jobs to appear as server jobs, you can monitor the application's
|
||
|
server jobs in iSeries Navigator.</p>
|
||
|
<p>The
|
||
|
following is an example in C code of how to name the server job using the
|
||
|
QWTCHGJB API. The program that is used for the server or client application
|
||
|
needs to run as a job. You can define the server or client application as
|
||
|
a job with the Submit Job (SBMJOB) command. </p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> By using the following
|
||
|
code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
||
|
<pre>/* Change job API - server type */
|
||
|
#include <qusec.h>
|
||
|
#include <QWTCHGJB.h>
|
||
|
|
||
|
typedef struct jobChangeInfo
|
||
|
{
|
||
|
Qus_Job_Change_Information_t fieldNum;
|
||
|
Qus_JOBC0100_t format;
|
||
|
char data[31];
|
||
|
} jobChangeInfo_t;
|
||
|
|
||
|
int main (int argc, char *argv[])
|
||
|
{
|
||
|
Qus_EC_t EcStruc;
|
||
|
Qus_EC_t* PtrEcStruc; /* iSeries structure for API errors. */
|
||
|
jobChangeInfo_t chg = /* Job change information for QWTCHGJB */
|
||
|
{
|
||
|
1, /* Number of variable length records. */
|
||
|
46, /* Length of attribute information */
|
||
|
1911, /* Key - Server Type. */
|
||
|
'C', /* Type of Data - Character. */
|
||
|
0X40,0X40,0X40, /* Reserved */
|
||
|
30, /* Length of data with server name. */
|
||
|
"YOUR_UNIQUE_SERVER_NAME "};
|
||
|
|
||
|
PtrEcStruc = &EcStruc; /* API error code structure. */
|
||
|
PtrEcStruc->Bytes_Provided = 16; /* Initalize bytes provided. */
|
||
|
PtrEcStruc->Bytes_Available = 0;
|
||
|
/*-------------------------------------------------------------------*/
|
||
|
/* API used for defining a server name in the job. */
|
||
|
/*-------------------------------------------------------------------*/</pre>
|
||
|
<div class="note"><span class="notetitle">Note:</span> The string in the second line of the following example is
|
||
|
padded with blanks to the full 30 characters.</div>
|
||
|
<img src="./delta.gif" alt="Start of change" /><pre>QWTCHGJB("* ",
|
||
|
" ",
|
||
|
"JOBC0200",
|
||
|
&chg,
|
||
|
PtrEcStruc);
|
||
|
if ( PtrEcStruc.Bytes_Available != 0 ) {
|
||
|
printf("Error changing job server name. Application ended.");
|
||
|
printf("Error message id %s sent from QWTCHGJB API.",PtrEcStruc.Exception_ID);
|
||
|
exit(-1);
|
||
|
}
|
||
|
return 0;
|
||
|
}</pre><img src="./deltaend.gif" alt="End of change" />
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|