Including network definition statements in STL

As you create your STL programs, you can facilitate development of your entire simulation by including your network definition in the same data set. In this way, you can easily refer to your network definition as you are creating the messages that will run through it. You will also find it easier to debug and modify your simulation using this method.

To define your networks in STL, you must code network definition statements exactly as you would if they were input to the Preprocessor. This means that you may not code STL comments within the network definition. You can only code scripting language comments. Refer to Creating WSim Scripts for more detailed information on coding the network definition.

You must code the STL @NETWORK and @ENDNETWORK statements to include the network definition in your STL input data set. You must place them around the statements. Also, you cannot code any STL statements after the @NETWORK statement on the same line. However, you may code STL comments there. You must code the @ENDNETWORK statement in column one so that the STL Translator can detect it. Code only one block of network definition statements in your input data set and place it at the top of the data set following any STL comments. You may define multiple networks within a single network definition block.

An example of an STL input data set including network definition statements is shown below.
/* My STL Input Data Set */
@network
netx     ntwrk     uti=100,delay=f2,stltrace=yes,mlog=yes
apath    path      amsg
wsim1    vtamappl  bufsize=3000
* LU Definition
wsim1lu  lu        lutype=lu2,display=(24,80),init=sec,path=(apath)
@endnetwork
@program=amsgx
amsg:    msgtxt
         say 'Hi'
         opcmnd 'zend'
         quiesce
         endtxt
Note: You can abbreviate the @NETWORK and @ENDNETWORK statements as @NET and @ENDNET.

The STL Translator also invokes the Preprocessor to validate your network definition. If you have not made any errors, the STL Translator stores your networks into the INITDD output data set and any other message generation decks you may have coded along with them into the MSGDD data set. It replaces any members that already exist in these data sets by the same name.

If you made errors when creating your STL programs, the STL Translator does not add or replace those members in the MSGDD data set. However, it will try to preprocess the network definition unless you specify the NOPREP execution parameter. If you made any errors in the network definition, the STL Translator does not add or replace any members in the output data sets.