background image
<< Using the APPC Protocol in RTE Vuser Scripts | RteGenerateDeviceName function >>
<< Using the APPC Protocol in RTE Vuser Scripts | RteGenerateDeviceName function >>

Generating Unique Device Names

Creating Vuser Scripts
Chapter 15, page 280
RTE Vuser Scripts · Recording RTE Vuser Scripts
In
Generating Unique Device Names
Some protocols, such as APPC, require a unique device name for each terminal
that logs on to the system. Using the run-time settings, you can specify that the
TE_connect function generate a unique 8-character device name for each Vuser,
and connect using this name. Although this solves the requirement for uniqueness,
some systems have an additional requirement: The device names must conform to
a specific format. For details about the run-time settings, see Chapter 6,
Configuring Run-Time Settings
.
To define the format of the device names that the TE_connect function uses to
connect a Vuser to the system, add an RteGenerateDeviceName function to the
Vuser script. The function has the following prototype:
void RteGenerateDeviceName(char buf[32])
The device name should be written into
buf
.
If an RteGenerateDeviceName function exists in a Vuser script, the Vuser calls the
function each time a new device name is needed. If no RteGenerateDeviceName
function is defined in the script--and unique device names are requireed--the
TE_connect function generates the required names.