The application called 3270ServerSample contains a sample 3270 server. Before you can use 3270ServerSample you must do the following:
The sample server is just that, a sample. Unless your environment is identical to the environment in which the sample was constructed, the sample can run only if you reconfigure the 3270 host connection to virtual mode.
If you try to run the sample server in a different environment in real mode, you will disable the 3270 sessions defined for it. Therefore, we recommend that you run the sample only in virtual mode or use it as an example of the types of scripts and the kinds of logic you can include in the 3270 servers you write.
Done: You can now run the 3270ServerSample application in virtual mode.
3270ServerSample is an example of a 3270 server that performs a simple query of an account balance based on a 6-digit account number. The sample includes script language statements that facilitate operation of the script in virtual mode.
The state table SrvrSample_3270 plays the initial greeting and prompts the caller to enter a 4-digit ID that identifies a valid application profile. The caller is allowed three attempts to enter a valid ID before the state table terminates the application with a good-bye message.
Upon registering a valid ID, the state table uses the OpenHostServerLink state table action to call the 3270 server, SrvrSample_3270. The caller is then prompted to enter the 6-digit account number of the account to be queried. If the sample is run in virtual mode, interaction is not with real host screens but with screens stored in the Blueworx Voice Response database. Consequently, the list of valid account numbers in virtual mode is limited to those present on the abrw screen. These valid account numbers are:
If the account number that the caller enters is valid, the account balance is played to the caller; otherwise, the caller is advised that the account number entered was not valid.
The state table performs a CloseHostServerLink action on SrvrSample_3270. This is followed by a good-bye message and a CloseEverything action.
The 3270ServerSample scripts fall into two groups: those used as part of the login and those called from the state table.
The scripts that are used for the login navigate to the amnu screen, which is the main menu screen of the host application. These scripts are:
The main login script is login_amnu, which calls the other scripts, depending on the screen encountered. The remaining scripts are used to navigate to the screen containing the account information, namely abrw.
Review the scripts themselves for a more detailed description of their behavior.