1110 Supporting On Demand Business Applications with the IBM Problem Determination Tools
32.3 Coding STL programs
STL is a high-level structured programming language that can be used to create message
generation decks and define terminals and devices to be simulated by WSim. STL utilizes
constants, variables, expressions, and structured control statements.
An STL program is usually divided into one or more procedures. The STL Translator
translates STL programs into message generation decks, each message generation deck
corresponding to one STL procedure. Network definitions can be included into STL programs.
NTWRKLOG MSGDISK, RATE, UTBL, SIDEINFO,
RN, UDIST, INCLUDE, IF, PATH
Optional
MSGDISK RATE, UTBL, SIDEINFO, RN, UDIST,
INCLUDE, IF, PATH
Optional
RATE RATE, UTBL, SIDEINFO, RN, UDIST,
INCLUDE, IF, PATH
Required if using rate table delays
UTBL UTBL, SIDEINFO, RN, UDIST,
INCLUDE, IF, PATH
Optional
SIDEINFO SIDEENT Optional
SIDEENT SIDEENT, SIDEEND At least one is required after SIDEINFO
SIDEEND RN, UDIST, INCLUDE, IF, PATH Required after the last SIDEENT
RN RN, UDIST, INCLUDE, IF, PATH Optional
UDIST UDIST, INCLUDE, IF, PATH Optional
INCLUDE INCLUDE, IF, PATH Optional, mostly used to define required
but not referenced message generation
decks
IF INCLUDE, IF, PATH Optional
PATH PATH, DIST, UTI, FILE, APPCLU,
VTAMAPPL, TCPIP
At least one is required
DIST DIST, UTI, FILE, APPCLU, VTAMAPPL,
TCPIP
Optional
UTI UTI, FILE, APPCLU, VTAMAPPL,
TCPIP
Optional
FILE FILE, APPCLU, VTAMAPPL, TCPIP Optional
APPCLU TP Optional
TP TP, APPCLU, VTAMAPPL, TCPIP, FE At least one is required after APPCLU
VTAMAPPL LU Optional
LU LU, VTAMAPPL, TCPIP, FE At least one is required after VTAMAPPL
TCPIP DEV Optional
DEV DEV, TCPIP, FE At least one is required after TCPIP
FE FE Optional
Statement Can be followed by Comments
Chapter 32. Basics of scripting for Workload Simulator 1111
The STL Translator invokes the preprocessor to validate and store the network definition
statements.
STL is similar but not equivalent to REXX. STL uses many of the same commands and
functions as REXX. However, STL is not the run-time scripting language; therefore, WSim
must process or translate STL into MSGTXT format prior to test execution.
Variables and constants
In STL, you can use variables and constants as data items in your programs. A variable
contains data that is used by a program in a certain way, but whose value can vary. In a
program, each variable has a unique symbolic name.
Constants are values that do not change in the course of program execution. Constants can
be used to initialize variables, to test the contents of variables, and to generate messages.
They can also make up part of STL expressions. Names can be assigned to most constants.
STL substitutes the actual constant value for the constant name.
Variables are classified as one of three data types:
򐂰 Integer
򐂰 String
򐂰 Bit
Integer variables can take any positive integer value from 0 to 2147483647. When a network
is first initialized, the value of an integer variable is 0. Integer variables translate into counters
in the scripting language. An integer variable's value will wrap if incremented beyond
2147483647 or decreased below 0. That is, if a variable has a value of 2147483647 and 1 is
added to it, the result is 0. If a variable has a value of 2 and 3 is subtracted from it, the result
is 2147483647.
String variables can contain only characters. They must be from 0 to 32767 characters long.
A character can be any 1-byte value, from '00'X to 'FF'x. When a network is first initialized, the
value of a string variable is '' (the null string, which is represented by a pair of single or double
quotation marks). String variables translate into save areas in the scripting language.
Bit variables represent binary data items. STL bit variables can have the value of ON or OFF.
When a network is initialized, all bit variables have a value of OFF. Bit variables translate into
switches in the scripting language.
Special variables are available to be used by your STL program:
BUFFER or SCREEN For nondisplay terminals, the device buffer; for display terminals,
the screen image. Use the SUBSTR and ROWCOL functions to
query a screen area, for example, x =
substr(screen,rowcol(10,20),6).
DATA or TH Incoming or outgoing data, including SNA headers if present.
RH The SNA request/response header (RH) portion of incoming or
outgoing data plus the SNA request/response unit (RU).
RU The SNA Request/response unit (RU) portion of incoming or
outgoing data.
Constants are classified as:
򐂰 Integer
򐂰 String
򐂰 Hexadecimal string
򐂰 Bit data

Get Supporting On Demand Business Applications with the IBM Problem Determination Tools (APA, DT, DT with Advanced Facilities, FA, File Export, FM, WS) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.