112 IBM Session Manager Implementation
LET t_command = ' '
In the example above, the name of the current panel is kept in the t_panel
Session Manager variable. This name is saved in the Session Manager user
variable uc_oldpan. The new panel name was entered on the Session Manager
menu command line so it is stored in the Session Manager variable t_command.
The t_command value is passed to the t_panel variable, then the t_command
variable is set to blanks and the logic falls to the end of the process section.
When the end of the process section is encountered, since no command is in the
t_command variable, Session Manager will present to the user the screen
defined in the t_panel variable.
To return to the first screen, panel statement logic has to repeat the process, but
this time placing the contents of uc_oldpan into t_panel, which will cause Session
Manager to reshow the first screen.
4.3.2 Scripts
The migration issue with scripts is that script conversion is a completely manual
effort. Scripts written in any of the competing products scripting languages will
have to be rewritten to provide the same function in Session Manager. One issue
of great concern is script verbs such as BRANCH or GOTO. The Session
Manager scripting language does not, directly, have a verb of equivalent
function. Script logic that branches to a point downline in the script can normally
be replaced with IF, THEN, ELSE statements. Logic that branches back to rerun
code can be replaced with DO loops. Example 4-9 and Example 4-10 represent
an example of script code that branches back and how a Session Manager script
code can be coded with a DO loop to accomplish the same thing.
Example 4-9 Code with branch back to repeat code
START Statement 1
.
.
Statement n
If value1 NE value2 THEN GOTO START
ELSE fall through
Example 4-10 Recoded for Session Manager
DO UNTIL value1 EQ value2
Statement 1
.
.
Statement n
Get IBM Session Manager Implementation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.