Products
Purchase
Support
Download
About
Contact
Session Manager

Project: Present the user with a choice of available host applications on startup of DynaComm. The user selects the desired sessions and the script connects, logs in, and goes to the selected application.

Algorithm: For simplicity, we’ll assume the session files for each host system are already configured with the proper settings, and each has a StartUp Script specified in Session:Properties, General tab, which logs the user into the system. Thus, all that is required of the Session Manager is to provide a dialog box or menu which lists host applications, and knows their associated session filenames. In this example, we’ll illustrate the use of a dialog box which includes checkboxes for the available host applications.

Relevant Commands and Functions:

DIALOG commands and functions — As described in Dialog Boxes example.
MENU commands and function — As described in GUI Customization example
CONNECT — Connects specified session file, loading it if necessary
CONNECT( ) — Indicates whether the specified session is connected
WINDOW OPEN — Allows you to open Session file, Script file, or Memo file
LOAD — Loads specified session file, connecting it if AutoConnect checkbox is set in Session:Properties, General tab
SHOW — Display each script command as it is executed.

A Brief Example

SHOW
DIALOG (120,80,140,100) "Session Manager" SYSMENU FALSE MODAL 1
MESSAGE (20,10,,) "Select the desired applications:"
CHECKBOX (10,30,,) 0 "All-in-One"
CHECKBOX (10,45,,) 0 "PROFS"
CHECKBOX (10,60,,) 0 "PINE"
CHECKBOX (70,30,,) 0 "PICO"
CHECKBOX (70,45,,) 0 "TEDIT"
CHECKBOX (70,60,,) 0 "OfficeVision/400"
BUTTON "OK" RESUME
BUTTON "Cancel" CANCEL
DIALOG END
WAIT RESUME

%Allinone=CHECKBOX(1,1)
%Profs=CHECKBOX(2,1)
%Pine=CHECKBOX(3,1)
%Pico=CHECKBOX(4,1)
%Tedit=CHECKBOX(5,1)
%OfficeV400=CHECKBOX(6,1)
DIALOG CANCEL 1
IF %Allinone = 1 CONNECT "Vax.Ses"
IF %Profs = 1 CONNECT "MVS.Ses"
IF %Pine = 1 CONNECT "Linus.Ses"
IF %Pico = 1 CONNECT "Unix.Ses"
IF %Tedit = 1 CONNECT "Tandem.Ses"
IF %OfficeV400 = 1 CONNECT "AS400.Ses"
RETURN

This illustration has three parts to it. In the first, the user is presented with a dialog box with checkboxes to select the applications to run. When the OK button is clicked, the script continues to the second part where the user selections are read from the dialog and the dialog box is cancelled. Finally, the appropriate session is opened and connected if the checkbox was checked.

Further Development:
Additional Examples:

Related examples: the Connection Management example given below addresses a related concern: disconnecting inactive sessions. The Event Monitoring project given above tracks session events.

The LNCHMLTI example script checks for SES files in the Session directory, and presents them as checkboxes in the dialog box. Thus, if the user creates additional SES files, these will appear in the Dialog with no modifications to the script.