Starting and Stopping Emulator Sessions

This chapter describes how to start and stop single and multiple emulator sessions.

If you saved your emulator configuration information, as described in Saving Configuration Information, it is stored in a workstation profile (*.WS), which should be displayed in the Session Manager.

Note:
If you are a first-time user of Personal Communications, or there are no session icons in the Session Manager, see Configuring Sessions to create a configuration.

Session Manager

Personal Communications uses the Session Manager dialog to provide easy access to workstation profiles and batch files. You can use the Session Manager to start a single or multiple sessions, and create a new session or batch file.

Note:
The Session Manager dialog only displays workstation profiles and batch files that are located in the Application Data location that was specified during Personal Communications installation. See Application Data for more information about application data.

You can drag an icon from the Session Manager to the Windows Start menu or to the desktop. Select one or more sessions and drag with the right mouse button. A contextual menu appears when the icons are dropped, which gives you the options for moving, copying, or creating a shortcut. If you drag an icon with the left mouse button held down, the icon is moved to that location. If you drag an icon while pressing the Ctrl key and with the left mouse button held down, the icon is copied to that location. If you drag an icon while pressing the Alt key and with the left mouse button held down, a shortcut is created for the icon.

You should use the shortcut option whenever possible. Moving and copying will affect the location (and therefore the function) of the profile. Specifically, when you copy a profile to the desktop instead of creating a shortcut, you have actually created another profile. Any changes you make to the desktop profile will not be reflected in the original profile (and vice versa). Also, the desktop profile is located in the desktop folder (not in the application data folder) and will not appear in the Session Manager--the original version of the profile remains in the Session Manager.

Session Manager Options

Various Session Manager options are available from the pull-down menus and the right-click menu. For example, you can customize the look of the displayed Session Manager information and import sessions or batch files into the Personal Communications Application Data directory.

Session Manager Menus

The following options are available from the Session Manager menus.

File
Change Directory
You can run files that are stored in a directory other than the Personal Communications Application Data directory.
Import
This option allows you to copy sessions or batch files to the Personal Communications Application Data directory. Afterwards, the imported files can be displayed in the Session Manager dialog.
View
Sessions
This option shows all valid workstation profiles that have the standard .WS extension and are located in the Application Data directory.
Multiple Sessions
This option shows all valid batch files that are have the standard .BCH extension and are located in the Application Data directory.
All File Extensions
This option shows all valid multiple sessions and workstation profiles that are located in the Application Data directory, regardless of extension.
Hidden
This option shows files that have been previously hidden using the right-click menu option. If this option is selected, hidden sessions are shown with black-and-white icons; otherwise, they will not be displayed.
Large Icons
This option shows large session icons in the Session Manager.
Small Icons
This option shows small session icons in the Session Manager.
Details
The following session detail information is displayed in the panel columns. The columns can be resized as needed.
  • File Name
  • File extension
  • Type (session or batch file)
  • Description (shows the information specified in the Description= field in the .WS file)
  • The following session information is not shown for batch files.
    • Host Name (if SNA, this column shows the .ACG file name).
    • Host Type (shows the host type specified in the Customize Communication dialog during session configuration)
    • Interface (shows the interface specified in the Customize Communication dialog during session configuration)
    • Attachment (shows the attachment specified in the Customize Communication dialog during session configuration)
    • Session Type (printer or display)
  • Modified (indicates the last modification date/time of the file)
Refresh
If you manually copy a session or batch file into the Application Data directory, you must refresh the Session Manager view in order to see the new files.

Right-Click Menu (Contextual)

The following options are available by right-clicking on one or more session.

Start
Starts the selected sessions
Delete
Deletes the selected sessions. You must have permission in the System Policy to delete any sessions from the Session Manager.
Hide/Unhide
You can hide or unhide sessions using this option. To view hidden sessions, you must select View -> Hidden. Hidden sessions have black-and-white icons when displayed.
Modify
This option is only available when selecting one or more batch files--the batch files are brought up in edit mode. You must have permission in the System Policy to modify batch files from the Session Manager.

Starting Sessions

You can use the following methods to start sessions:

Note:
Connection status messages are displayed on a status bar at the bottom of your session window during connection to the host.
Starting from the Start or Configure Sessions Icon
Select Programs -> IBM Personal Communications -> Start or Configure Sessions from the Start menu. Select the desired session from the Session Manager dialog and click the Start button.
Starting from an Existing Session Window
Use the following methods to start from an existing session window:
Starting Another Session Using the Same Profile
Select Run the Same from the File menu. Another session starts, using the same profile.
Starting Another Session Using a Different Profile
  1. Select Run Other from the File menu.

    The Open Other Workstation Profile window appears.

  2. Double-click the desired workstation profile in the File Name list.
  3. Select OK.

    Another session starts, using the profile specified in step 2.

Starting a Different Type of Session from a Session Window
  1. Select Open from the File menu.
  2. Specify the desired workstation profile and then select OK.

    The current session ends and then another session starts, using the selected profile.

Starting Using a Command
To start a session, use the following procedure:
  1. Start a DOS command prompt.
  2. Enter the command
      PCOMSTRT /P=x:\AppData\my.WS

    where my.WS is the workstation profile stored in the Application Data directory specified during installation. This is the only required parameter.

    Note:
    If multiple /p parameters are given, PCOMSTRT only uses the last one to start a profile (.WS file).

    For a complete description of parameters, refer to Administrator's Guide and Reference.

Another method for invoking Personal Communications using a command is with the command for the PCSWS.EXE module (see Command line options for PCSWS.EXE).

Starting Multiple Sessions

If you installed the Multiple Sessions utility, you can use the batch program PCSWS.EXE, which runs batch files (*.BCH), to start two or more workstation profiles at the same time. Personal Communications batch files can also start other programs when you include their startup commands. This is especially useful if you always want to start an application when you start a session. For example, you might want to start an application, such as ZipPrint, that uses a Personal Communications API.

Note:
You must have permission in the System Policy in order to create a new batch file.

If you created an icon for your batch file, double-click the icon in the Session Manager or select the icon and click the Start button.

Command line options for PCSWS.EXE

You can use the following options when creating or modifying a batch file.

Notes:
  1. If you use the /S option to assign A as the short session ID, you should use this option for all of the sessions in the batch file. Otherwise, if another session starts first, it becomes the A Session and the session with the /S=a option will not start because of the conflicting short session IDs. Another way to prevent conflicts is to assign a character later in the alphabet for the short session ID.
  2. Several parameters can be specified for controlling the particular characteristics for starting sessions; the switch values are designated by a single character.

Creating a Batch File

To create a batch file, use the following procedure:

  1. From the Session Manager dialog, click New Multiple Sessions. You can also start a new batch file from the Windows Start menu, using the IBM Personal Communications -> Utilities -> Multiple Sessions program.

    The Create/Modify Batch File panel appears.

  2. There are several methods for including profiles or programs in a batch file:

    Personal Communications places the full path and command that is needed to run the workstation profile or other program above the cursor line in the edit area. If there is no cursor, the command is added to the last line.

    To see the contents of the profile you added to the batch file, click it in the File Name list box and then click View File or the magnifying glass.

    Note:
    Some brief instructions appear at the top of Batch-File Entries; you need not remove them, because they do not affect the running of the batch file.

    There is one exception--if you are using the Japanese version of Personal Communications, you must delete these instructions. One way to do this is to select File -> New from the Create/Modify Batch File dialog before adding any files.

  3. Repeat step 2 for each subsequent file to be added.
  4. When you complete the edit, save the created batch file by selecting Save from the File menu.

    The Save Batch File As window appears.

  5. Enter a name for the batch file (*.BCH).

    The name you enter is used as the icon title, unless you enter a description as well.

The following example is a batch file that runs four workstation profiles located in the Application Data directory, and then runs MYAPP.EXE.

C:\dir\PCSWS.EXE C:\AppData\SLAN1.WS
C:\dir\PCSWS.EXE C:\AppData\SLAN2.WS
C:\dir\PCSWS.EXE C:\AppData\AS4Y1.WS
C:\dir\PCSWS.EXE C:\AppData\VT220.WS
C:\APPL\MYAPP.EXE

where C:\AppData is the Application Data directory specified during installation and dir is the installation directory.

Saving Multiple Session Views

You can use the Create/Modify Batch File panel to capture up to multiple session views. Simply size and position up to Maximum session windows, which is configured in the User Preference and click the Capture View button. Name the view and click Save View in the View Setup panel. You can save up to eight views. You may also delete previously saved views from the drop-down list in the View Setup panel.

If a view is already being used when you click Capture View, that view is automatically used and you are not prompted to save a new view.

Starting a Batch File

You can use one of the following methods to run a batch file:

Editing an Existing Batch File

To edit an existing batch file, do one of the following:

Starting Multiple Sessions without a Batch File

To start multiple sessions without a batch file, use the following procedure:

  1. Start the Session Manager.
  2. Select the icons for the sessions, then click the Start button. You can select icons using a drag selection box or holding down the Ctrl key while selecting icons with the mouse.
  3. After it connects to the host, select one of the following choices from the File menu:

Automatically Starting Sessions

To start one or more sessions automatically, use the following procedure:

  1. From the Start menu, select Settings -> Taskbar.
  2. Click the Start Menu Programs tab and then click Add.
  3. Click Browse and then open the Application Data directory specified during installation.
  4. Change the file type to All Files.
  5. Double-click the session icon or the batch icon.
  6. Click Next and then double-click the Startup folder.
  7. Accept the icon name or type a new one.
  8. Click Finish and then OK when you are done.

You can also drag an icon from the Session Manager to the Startup folder as a shortcut.

Stopping Sessions

To stop a session, click the X in the upper right corner or double-click the upper left corner of the session window, or select Exit from the File menu.

To stop multiple sessions at the same time, select Exit All from the File menu. All emulator sessions end, and the associated session windows are closed.

Sessions can also be stopped using a command:

  1. Select Run or Programs -> MS-DOS Prompt from the Start menu.
  2. Enter one of the following commands:
       PCOMSTOP /S=x  
       PCOMSTOP /ALL

    where x is the session letter of the particular session to be stopped; use ALL to stop all active sessions. There are other parameters; for a complete description, refer to Emulator User's Reference.

Note:
Stopping a Telnet session automatically closes an associated printer session, if that option was selected when configuring the session. See Printer Session Association for information on how to automatically close an associated printer session.

Option to suppress confirmation message for pcomstop

When invoking pcomstop.exe from the command line, the NCE option can be used to suppress the exit confirmation message, which is shown when one or all sessions.

Example:

PCOMSTOP /S=<session>|/ALL [/Q] [/C] [/NCE] [/?]

One of the following parameters must be specified:

The following parameters are optional:

Stopping an emulator session without access to the tool bar

This method can help you to stop a session when security restrictions do not allow tool bar access.

To stop an emulator session without access to the tool bar, you can use the mouse or a keyboard shortcut to launch pcomstop.exe. Use the following procedure to set up the pcomstop.exe shortcut:

  1. Create a shortcut for pcomstop.exe on the desktop or wherever you need.
  2. Right-click the shortcut to view the Properties window.
  3. Click the Shortcut tab.
  4. The executable name and path are in the Target input box. Append any required parameters to this path and click OK. These parameters will be used when the pcomstop.exe file is launched. For example, if you want to stop session A, modify the appended path:
    "E:\Program Files\IBM\Personal Communications\pcomstop.exe" /s=a
    Note:
    The /S or /ALL option is required to run pcomstop.exe. The /ALL option stops all sessions, while the /S=x option stops a particular session (where x is the session letter).
  5. In the Shortcut Key input box, type the key that you want to use as a shortcut (for example, X), and click OK.

You can then launch pcomstop.exe by the following methods:

Windows

always adds the Ctrl+Alt sequence to the shortcut key. For example, Ctrl+Alt+X becomes the shortcut for invoking pcomstop.exe and closes the emulator session.