User Guide

154 Other Installation Options
Other Installation Options
103-000143-001
August 30, 2001
Novell Confidential
Manual 99a38 July 17, 2001
part of the variable name and must be included with the variable when referencing
it later. If the filename doesn't exist, it will be created. The varname and var value
will then be written. If the file does exist, the varname and var value will be
appended to the contents of the file.
External Command Programming Interface
The external command programming interface contains the functions
described below.
IMPORTANT: These functions require ICMD.NLM 2.18 or later.
ICMDSetVar
Use the ICMDSetVar function to set a script variable programmatically.
Function
int ICMDSetVar (char *variableName, char *variableValue)
*variableName: Pointer to name of variable to set
*variableValue: Pointer to string representing value of variable being set
Return
0 if successful; non-zero error code if unsuccessful.
Description
ICMDSetVar is a function exported by ICMD.NLM that another NLM can
call (for instance, in a blocking NLMExec command). This lets the NLM set
a variable within a script being executed by ICMD.NLM so the NLM can
communicate with the script, changing the control flow, etc.
Example
If MYNLM.NLM has code as follows:
ICMDSetVar(“mynlmvar”, “hello world”); exit();
and the script looks like this:
NLMExec 1, mynlm
Display 0, “Information: %{mynlmvar}”
then this popup text box would be displayed:
Information: hello world