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 Z and I Emulator for Windows, or there are no session icons in the Session Manager, see Configuring Sessions to create a configuration.

Session Manager

Z and I Emulator for Windows 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 Z and I Emulator for Windows 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 Z and I Emulator for Windows 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 Z and I Emulator for Windows Application Data directory.
Import
This option allows you to copy sessions or batch files to the Z and I Emulator for Windows 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
    • 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.

Session Manager Online

ZIEWin uses the ZIE service manager (referred to, as 'ZIE Server' going forward) to provide auto-upgrade capability and centralized management of configuration files.

The Session Manager Online notifies users if any new version of Z and I Emulator for Windows is available online for update on the configured Web Server.

After confirmation from the User, Z and I Emulator for Windows will be auto-upgraded to newer versions. Z and I Emulator for Windows uses the Session Manager Online dialog to provide easy access to connect to the ZIE Server and work with workstation profiles and batch files online. Users can configure the ZIE Server and work with their User Profiles in the Online mode, but by default, are not allowed to create new user entries on the server, unless permitted to do so, by a system administrator. To enable users to be able to create user entries, a ZIEWeb (Z and I Emulator for Web) administrator must enable the "Allow users to create accounts" check box on the ZIE for Web Server, using the ZIEWeb (Z and I Emulator for Web) Administration Console. The new users that are created are added to the "ZIEWin" group on the ZIE Server.

The ZIE Server can either be configured by providing the required server details in the 'InstallShield Wizard' at the time of ZIEWin installation itself, or can be added/updated in the 'ZIE Server Detail' section of the Advanced tab within the Preferences. Users can migrate the Workstation profiles and batch files from Application Data location, upon login to the ZIE Server. If the User chooses to migrate, the Workstation profiles, batch files and their dependent files available on "Application Data" location get migrated

List of the supported files for online option are below:

Multiple instances of the Session Manager (offline) can be invoked at a time, but for Session Manager Online, only one instance can be invoked at a time. An instance of Session Manager Online and Session Manager (offline) can both be operated simultaneously.

First time configuration of the Online Session Manager :

When you select Start or Configure Sessions - Online for the first time from the Windows Start menu, the 'Z and I Emulator for Windows: Online' panel is displayed with the following tabs :

Session Manager - Online LOGIN Screen :

The Login Screen is the default page that opens whenever the Online Session Manager is launched, if a User is already created on the server and the Profile migration is also completed successfully. A user can login to the Online session manager using any of the User Profiles that were created on the ZIE server. The user can also change the password by clicking on the check box for 'Change Password' on the Login page. If the user name or password entered on the Login page are incorrect, the user gets prompted to either 'Re-try with different credentials' to Login again, or, to 'Run offline', i.e, to close the Online Session Manager and launch the Offline Session Manager instead. After successful logon, profiles will be retrieved from the ZIE server, and can be viewed in the sessions list.

Session Manager Online Options :

File menu options

View menu options

Detect and Repair

Detect and Repair might be automatically initiated if the Z and I Emulator for Windows installation has been corrupted. This function uses Windows Installer to repair damage to the installed product; you may be prompted for the installation source or image.

You must be authorized in the System Policy to use this option. See Detect and Repair for more information about this feature.

Right-click menu options (contextual)

Icon drag-and-drop options

You can drag an icon from the Session Manager to the Windows Start menu or to the desktop. Select the session(s) 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).

Installer enhancements

ZIEWin Installer panel

As part of Managed HCL Z and I Emulator for Windows (MZIEWin) feature, a panel is available in HCL Z and I Emulator for Windows Installer, where a user can provide the ZIE Server configuration details in the installation panel.

Here are the configuration parameters,

  1. Web Server Details : The URL of the Web Server from where HCL Z and I Emulator for Windows fix pack file will be downloaded for installation. Installer or fix pack will be installed on the system by "Start or Configure Sessions - Online" program.
  2. Config Server : DNS Name or IP address of the ZIE server, where the User profiles are stored in a centralized location.
  3. Config Server Port : The port that is used to connect to the ZIE server.

The ZIE server configuration is optional only, user can click Nextto skip the configuration, and can configure this through "Preferences" utility post installation. For more details regarding the Preferences, see Preferences.

Auto-Update of HCL Z and I Emulator for Windows (ZIEWin):

ZIEWin supports automatic upgrade. ZIE administrators can manage the upgradation of ZIEWin clients by placing the upgrade configuration file in the Web Server, which has the information of recommended fix-packs or refresh packs that are available on the Web Server. The Web Sever URL can be provided during installation or can be configured via the "Preferences" utility.

When a User invokes the "Start or Configure Sessions - Online", the application checks if the installed version of ZIEWin is lower than the recommended version. If the ZIEWin installed on the system is of a lower version, the User gets a notification of the latest available ZIEWin version. The User can either choose to upgrade or decline the upgrade option.

Note:
The upgrade configuration file is unique for every refresh pack installer and is shipped along with the Fixpack package.

For details regarding the Managed ZIEWin Configuration parameters and changes in Preferences, see ZIE Server Details.

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 -> HCL Z and I Emulator for Windows -> 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 Z and I Emulator for Windows 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. Z and I Emulator for Windows 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 Z and I Emulator for Windows 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 HCL Z and I Emulator for Windows -> 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:

    Z and I Emulator for Windows 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.
  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 Preferences 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\HCL\Z and I Emulator for Windows\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.