70 lines
3.7 KiB
HTML
70 lines
3.7 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">
|
||
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
||
|
|
||
|
<title>Use wsadmin to manage substitution variables</title>
|
||
|
</head>
|
||
|
|
||
|
<BODY>
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
<h4><a name="wsavar"></a>Use wsadmin to manage substitution variables</h4>
|
||
|
|
||
|
<p>You can use wsadmin to configure a variable map for your application server. You can configure multiple variable maps, but they are all stored in the variables.xml file.</p>
|
||
|
|
||
|
<p>To configure a variable map for your application server, follow these steps:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li><p>On the CL command line, run the STRQSH (Start Qshell) command.</p></li>
|
||
|
|
||
|
<li><p>Run the cd command to change to the directory that contains wsadmin:</p>
|
||
|
<pre>cd /QIBM/ProdData/WebASE/ASE5/bin</pre></li>
|
||
|
|
||
|
<li><p><a href="wsarun.htm#start">Start wsadmin</a>.</p></li>
|
||
|
|
||
|
<li><p>At the wsadmin prompt, run this command to identify the server and assign it to the server variable:</p></li>
|
||
|
<pre>set server [$AdminConfig getid /Cell:<em>myCell</em>/Node:<em>myNode</em>/Server:<em>myAppSvr</em>/]</pre>
|
||
|
<p>where <em>myCell</em> is the name of the cell that contains your application server, <em>myNode</em> is the name of the node that contains your application server, and <em>myAppSvr</em> is the name of your application server.</p></li>
|
||
|
|
||
|
<li><p>Create an empty variable map or identify an existing variable map for the application server. Assign the variable map to the varMap variable.</p>
|
||
|
<ul>
|
||
|
<li><p>To create an empty variable map for the server and assign it to the varMap variable, run this command:</p>
|
||
|
<pre>set varMap [$AdminConfig create VariableMap $server {}]</pre>
|
||
|
|
||
|
<li><p>If your server has an existing variable map, run this command to get its configuration object and assign it to the varMap variable:</p>
|
||
|
<pre>set varMap [$AdminConfig getid /Cell:<em>myCell</em>/Node:<em>myNode</em>/Server:<em>myAppSvr</em>/VariableMap:/]</pre>
|
||
|
<p>where <em>myCell</em> is the name of the cell that contains your application server, <em>myNode</em> is the name of the node that contains your application server, and <em>myAppSvr</em> is the name of your application server.</p></li>
|
||
|
</ul><p></p></li>
|
||
|
|
||
|
<li><p>Set the variable map entry attributes. In this example, you create variable map entries APPLICATION_SPECIFIC_ROOT and APPLICATION_SPECIFIC_LIB_DIR.</p>
|
||
|
<pre>set nameattr1 [list symbolicName APPLICATION_SPECIFIC_ROOT]
|
||
|
set valattr1 [list value "application/specific/root"]
|
||
|
set nameattr2 [list symbolicName APPLICATION_SPECIFIC_LIB_DIR]
|
||
|
set valattr2 [list value "/${APPLICATION_SPECIFIC_ROOT}/lib"]
|
||
|
set attr1 [list $nameattr1 $valattr1]
|
||
|
set attr2 [list $nameattr2 $valattr2]
|
||
|
set attrs [list $attr1 $attr2]</pre>
|
||
|
<p>These commands return this output:</p>
|
||
|
<pre>{{symbolicName APPLICATION_SPECIFIC_ROOT} {value application/specific/root}}
|
||
|
{{symbolicName APPLICATION_SPECIFIC_LIB_DIR} {value {${APPLICATION_SPECIFIC_ROOT}/lib}}}</pre></p>
|
||
|
|
||
|
<li><p>To add the two new entries, run this command to modify the entries attribute in the variable map:</p>
|
||
|
<pre>$AdminConfig modify $varMap [subst {{entries {$attrs}}}]</pre>
|
||
|
|
||
|
<li><p>Run this command to save your changes:</p>
|
||
|
<pre>$AdminConfig save</pre></li>
|
||
|
|
||
|
<li><p>If you want to view the variable map, run this command:</p>
|
||
|
<pre>$AdminConfig showall $varMap</pre>
|
||
|
<p>The command returns this output:</p>
|
||
|
<pre>{entries {{{symbolicName APPLICATION_SPECIFIC_ROOT}
|
||
|
{value application/specific/root}} {{symbolicName APPLICATION_SPECIFIC_LIB_DIR}
|
||
|
{value ${APPLICATION_SPECIFIC_ROOT}/lib}}}}</pre></li>
|
||
|
</ol>
|
||
|
|
||
|
</body>
|
||
|
</html>
|