background image
<< typical data | Working with Correlated Scripts >>
<< typical data | Working with Correlated Scripts >>

Correlating Statements

Windows Sockets Vuser Scripts · Developing Windows Sockets Vuser Scripts
Creating Vuser Scripts
Chapter 12, page 223
Correlating Statements
After you record a Windows Sockets Vuser script, you can run Vusers on several
machines. In certain instances, running the recorded code will result in an error. For
example, if you record a session where unique values are assigned to the session,
such as unique process IDs (PIDs), you will be unable to rerun the script
successfully. During execution, the recorded program receives a new PID. If you try
to use the old PID, it will have no effect.
In such cases, the solution is to correlate the statements--save the actual run-time
values and use them within the script. The Correlated Statements feature allows
you to link statements by using the output of one statement as input to another
statement. For a detailed example, see
Working with Correlated Scripts
below.
The main steps in correlating queries are:
1
Saving the results.
You save a recorded or received value to a variable using the lrs_save_param or
lrs_save_param_ex functions. You must insert this function into your script
manually.
2
Referencing the saved value.
Insert the parameter in all the functions or data buffers that need to use the
parameter's run-time value.