Referencing STL programs in your network definition
A network definition defines resources and operation options for your simulated network. Your network definition statements tell WSim which STL programs generate messages for each simulated resource. As explained in Creating WSim Scripts, you can specify a set of message generation decks or STL procedures for an entire network, or you can specify a different sequence for each line, terminal, and device.
If you create your STL programs as recommended previously, they each perform independent tasks that are part of the whole simulation. Also, they each have one main procedure call the other procedures defined in the program.
To refer to a program in a network definition statement, just code the main procedure name.
- PATH statements in your network definition list the main procedures representing STL programs to be used by each resource in your simulated network. For each simulated resource, you can code a PATH statement to specify the main procedure names representing the STL programs to be executed by the resource and the order of execution. The programs are executed repeatedly until the simulation is ended. See Creating WSim Scripts for more information about how the procedures (message generation decks) can be listed.
- The PATH operand specifies which PATH statement defines the main procedures representing the STL programs to be used for a particular resource.
- INCLUDE statements in your network definition let you include any procedures used by the network during the simulation run. You need to code an INCLUDE statement for any procedure used in your simulation that is not either included in a PATH statement or explicitly called or executed within your program. For example, this can be procedures called on a new path the operator specifies by issuing the A (Alter) operator command.
- The FRSTTXT operand defines the main procedure representing an STL program to be used as the first program in a simulation. It is used only once and not repeated. Typically this procedure contains your logon logic.
- The ATRDECK operand specifies the name of the main procedure representing an STL program to be invoked automatically to provide automatic terminal recovery.
The PATH and INCLUDE statements are coded in your network definition. The PATH and FRSTTXT operands are coded on the DEV, TP, or LU statement defining the resource for which they are used or on higher-level statements such as NTWRK, VTAMAPPL, TCP/IP, and APPCLU statements. The ATRDECK operand is coded on the DEV or LU statement.
See Creating WSim Scripts for a more complete explanation of these statements and operands. You should be familiar with these books so that you are aware of the range of possibilities available to you when designing the messages to be simulated with your STL programs.
testnet ntwrk uti=100,bufsize=6000,delay=f(5),
stltrace=yes,mlog=yes,logdsply=both
mypath path test1,coffee
* ***** ******
appl1 vtamappl
mylu lu lutype=lu2,path=(mypath),init=sec,maxsess=(0,1),
display=(24,80),frsttxt=logon
In the network
definition shown above, the LU first executes the main procedure named
LOGON referenced on the FRSTTXT operand. Then it executes the programs
represented by the main procedures named on the PATH statement MYPATH:
TEST1 and COFFEE.Each main procedure, representing a program, named on a path statement is called a path entry. When a represented program is named on a path entry, WSim executes that main procedure representing the program and any procedures called by that program in the course of its execution.
┌──────────────────────────────┐ │ │ │ /* Program #1 */ │ │ @program = program1 │ │ edit: msgtxt │ │ │ │ /**************************/ │ │ /* */ │ │ /* This data set contains */ │ │ /* an STL program that */ │ │ /* edits a data set. */ │ │ /* */ │ │ /**************************/ │ │ . │ │ . │ │ . │ │ endtxt │ │ @endprogram │ │ │ │ │ │ /* Program #2 */ │ │ @program = program2 │ │ compile: msgtxt │ │ │ │ /**************************/ │ │ /* */ │ │ /* This data set contains */ │ │ /* an STL program that */ │ │ /* invokes a compiler. */ │ │ /* */ │ │ /**************************/ │ │ . │ │ . │ │ . │ │ endtxt │ │ @endprogram │ │ │ └──────────────────────────────┘
*NETWORK DEFINITION STATEMENTS
*
(This is
the PATH --> LU1PATH PATH EDIT,COMPILE
definition) .
.
(This is .
the LU --> LU1 LU PATH=LU1PATH,...
definition) .
.
.
*WSim NETWORK DEFINITION STATEMENTS . . . LU1PATH PATH EDIT,COMPILE │ │ ┌────────────────┘ └────────────┐ │ │ │ ┌──────────────────────────────┐ │ ┌──────────────────────────────┐ │ │ │ │ │ │ │ │ /* Program #1 */ │ │ │ /* Program # 2 */ │ │ │ @program = program1 │ │ │ @program = program2 │ └─┼→edit: msgtxt │ └─┼→compile: msgtxt │ │ │ │ │ │ /**************************/ │ │ /**************************/ │ │ /* */ │ │ /* */ │ │ /* This data set contains */ │ │ /* This data set contains */ │ │ /* an STL program that */ │ │ /* an STL program that */ │ │ /* edits a data set. */ │ │ /* invokes a compiler. */ │ │ /* */ │ │ /* */ │ │ /**************************/ │ │ /**************************/ │ │ . │ │ . │ │ . │ │ . │ │ . │ │ . │ │ endtxt │ │ endtxt │ │ @endprogram │ │ @endprogram │ └──────────────────────────────┘ └──────────────────────────────┘
/* STL Program */
edit: msgtxt
/**********************************/
/* */
/* This data set contains an */
/* STL program that edits a data */
/* set. */
/* */
/**********************************/
.
.
.
call locate
.
.
.
call change
.
.
.
endtxt
locate: msgtxt
.
.
.
endtxt
change: msgtxt
.
.
.
endtxt
* NETWORK DEFINITION STATEMENTS
⋮
LUPATH PATH EDIT
Note that only the EDIT procedure is referenced
on the PATH statement.