Building Performance Test script statements using <EXECUTE> (Scripting)


Performance Test allows you to build script statements (<Inn>, <KEY>, <Snn>, <HEX>, etc.) for immediate execution using the <EXECUTE> statement. The data after the <EXECUTE> statement can contain a mixture of constants and variables as outlined under variable substitution.

Warning

Important

Performance Test allows you to use the <EXECUTE> tag to build script statements but not REXX statements. The REXX programming language includes the INTERPRET statement to provide the same capability for REXX commands, such as CALL, PARSE, DO, and ADDRESS.

The most common use of the <EXECUTE> statement is to vary the number of inputs entered on a screen. For example, an order entry application has a screen where as many as 25 items can be entered per order. The order numbers and item numbers are in an external file. Each statement has an order number and item number. On the screen, order number is input field 1, item numbers are input fields 2 through 26.

Information
Example

"EXECIO * DISKR ORDERS (STEM INPUT. FINIS"
DO K=1 TO INPUT.0
PARSE VAR INPUT.K ORDER.K ITEM.K
END
DO J=1 TO INPUT.0
<INPUT>
<KEY>ENTER
<I01>ORDER.J
DO K=2 to INPUT.0
<EXECUTE>"<I0"||K||">"ITEM.K /*Builds <I0n>ITEM.K*/
END
</INPUT>
END

You can also use the <EXECUTE> tag to replace other Performance Test script pieces with variables. For example, to use REXX to alter which key should be pressed on an input message, you can use the <EXECUTE> tag.


Information
Example

IF error = ‘YES’ THEN
input_key = ‘PF3’
ELSE
input_key = ‘ENTER’
<INPUT>
<EXECUTE>”<KEY>”||input_key
</INPUT>


You can also use <EXECUTE> to decide which input field number to use.


Information
Example

IF command_line_location = ‘AT THE TOP’ THEN
field_number = ‘01’
ELSE
field_number = ‘15’
<INPUT>
<KEY>ENTER
<EXECUTE>”<I”||field_number||’>”submit”’
</INPUT>


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Performance Test 17.02