ASCII Host File Transfer

Setting Preferences

You can set up your Workstation to perform file transfers; some preferences need to be set first, as described in this section. Other facilities to simplify handling of transfers are also described.

Using XMODEM and YMODEM

Z and I Emulator for Windows allows you to transfer files to and from ASCII hosts that support the XMODEM and YMODEM protocols. In order to use XMODEM or YMODEM, you must have established a connection to an ASCII host.

Choosing a Protocol

You have four choices for protocols. The one you select will depend upon the protocols supported by your ASCII host and by your particular requirements. The following table shows the capabilities of the protocols:

Downloading Uploading
Single File Multiple Files Single File Multiple Files
XMODEM Yes No Yes No
XMODEM1K Yes No Yes No
YMODEM Yes Yes Yes Yes
YMODEMG Yes Yes Yes Yes
XMODEM
The XMODEM protocol is a single-file half-duplex protocol that performs error checking. Data is transmitted in 128-byte packets. Error checking, either by CRC or by checksum, occurs automatically. The Z and I Emulator for Windows implementation of XMODEM first tries CRC. If the sender fails to acknowledge the first three requests for CRC, XMODEM shifts to the checksum mode.
XMODEM1K
The XMODEM1K protocol is the same as XMODEM, except that it always uses CRC and has a larger packet size of 1024 bytes. Because some hosts are not able to handle the 1024-byte packets, there is a need for both XMODEM and XMODEM1K
YMODEM
The YMODEM protocol is similar to XMODEM, but it allows you to send multiple files in a single transfer. You may use a set of unique file names, or you may specify groups of files.
YMODEMG
The YMODEMG protocol is the same as YMODEM, supporting multiple files, but it does not supply error checking. It assumes that the data always transfers correctly, and is only for use with error-correcting modems. For large amounts of data it can achieve much greater throughput than YMODEM because it does not wait for packet acknowledgment.

XMODEM and XMODEM1K

To use XMODEM, click Edit -> Preference -> Transfer in your Z and I Emulator for Windows session. The Transfer Preferences window appears. Select the XMODEM or XMODEM1K protocol, and optionally click on the tab for the selected modem protocol to define the Transfer Type or to change advanced settings.

When receiving a file, in the Receive File from Host dialog box, enter the file name in the PC File field or select a personal computer file name from the drop-down listbox. The transfer type is automatically generated according to the templates.

YMODEM and YMODEMG

To use YMODEM, click Edit -> Preference -> Transfer in your Z and I Emulator for Windows session. The Transfer Preferences window appears. Select the YMODEM or YMODEMG protocol, and optionally click on the tab for the selected modem protocol to define the Transfer Type or to change advanced settings.

When receiving a file, you cannot select the personal computer file name, but you can change the default transfer type, the drive, and the directory, if necessary.

File-Transfer Timeout

You can define the time the workstation waits for a response from the host system (in seconds). If the host system does not respond, the transfer is canceled, and an error message appears. A number in the range 20-65535 (or 0) can be specified. The default is 60 seconds for ASCII sessions. Specify an appropriate value such that the error message does not appear too early. If you specify 0, a timeout is not set.

If a packet or block size is relatively large for low-speed lines, such as COM port lines, it is recommended that 150 seconds or greater be specified.

Extension for List-Files

You can change the default extension (.SRL) of file-transfer list files.

Show Status Window

You can choose the method of displaying the file-transfer-progress status.

In Session
When file transfer starts, the status window appears. The name of the file being transferred and the transfer progress appear.
In Icon
When file transfer starts, the status icon appears on the screen. If the icon is restored, the status window appears.

Defining Transfer Types

Transfer types define the option information used for controlling file transfer. Up to 32 transfer types can be defined for each host system. The original default types are: delete (deletes a file on abort), over (overwrites existing files) and none (does not delete on abort, and does not overwrite).

To add or change transfer types:

  1. Click Edit -> Preference -> Transfer.
  2. Click the tab for the modem protocol you have selected. The items that appear depend on the selected host system.
  3. Enter transfer-type names in the Transfer-Type text box, or select them from the drop-down list.
  4. To add or replace a transfer type, click Save. To delete a transfer type, click Delete.
  5. Depending on the transfer type, select one of the following file receive options:
    Delete File on Abort
    With this option, if a file transfer is aborted then the incompletely received file is automatically deleted.
    Overwrite Existing File
    With this option, any existing file with the same name as the incoming file is overwritten.

    If you do not select this option, then a new name is given to the incoming file, according to the following scheme:

    Existing file: EXAMPLE.TXT
    First contender becomes: EXAMPLE.TX1
    Second contender: EXAMPLE.TX2
    Tenth contender: EXAMPLE.T10
    Hundredth contender: EXAMPLE.100
    999th contender: EXAMPLE.999
  6. Click OK.

These options are independent of each other.

File Transfer Templates

For sending ASCII files, Z and I Emulator for Windows automatically generates Host file names and transfer types. For receiving ASCII files via XMODEM and XMODEM1K, Z and I Emulator for Windows generates a transfer type. In both situations, templates define the rules for file name and transfer type generation.

Defining Templates

The templates are common for all sessions and are used for both sending and receiving files. For ASCII host file transfer, you can define up to three templates for each protocol.

To display the templates panels, click the Templates button in the Send File to Host or Receive File from Host panel.

You can add, delete, or replace templates; you can also test templates to see how Z and I Emulator for Windows generates the target file name and transfer type.

When defining templates, you can use * (asterisk) for the global searching of file names; for example, *.EXE for all files that have a file name extension of EXE.

Automatic Generation of File Names

The templates are numbered from 1 to 32; when Z and I Emulator for Windows generates file names, the templates are searched, starting from 1, and the first template that matches is used.

Example of ASCII Protocol Template

The following example shows the use of templates for ASCII host file transfer. When sending files, Z and I Emulator for Windows automatically generates a host file name from a personal computer file name, and vice versa. It also generates a transfer type. When receiving files, Z and I Emulator for Windows automatically generates only transfer types, and only for the XMODEM and XMODEM1K protocols.

For more information about templates, refer to Administrator's Guide and Reference.

Following are the definitions of the three default templates. The template is selected from the available choices by matching the name of the file being transmitted or received against each template's file specifications.

Template Number Wildcard specification for PC File Wildcard specification for host File Type
1 *.exe *.* delete
2 *.txt *.* over
3 *.* *.* none

Send Example: If you enter program.exe, Z and I Emulator for Windows selects template 1, and displays program.exe delete in the list box.

Receive Example: (XMODEM AND XMODEM1K only) If you enter program.exe, Z and I Emulator for Windows selects template 1, and displays program.exe delete in the list box.

Working with Lists of Files

For transferring a group of files it is convenient to use a list. A list makes it easier to transfer the same groups of files frequently, with a single command. Even if you are transferring a group of files only once, a list can help prevent errors. A list of files is itself a file.

You can transfer multiple files at once by using the send/receive list; it is accessible from the Send Files to Host or Receive Files from Host windows. For either window, the files selected are displayed in a Transfer List. This list can be saved, and later retrieved and modified. For instructions on selecting a file, see Receiving Files from an ASCII Host and Sending Files to an ASCII Host.

File Name Extension for List Files

By default, send/receive list files have a file name extension of .SRL. You can change this default on the property page with the General tab, by clicking Preferences -> Transfer from the Edit menu.

Note:
Z and I Emulator for Windows does not recognize a file as a send/receive list file unless its name has the specified extension.

Remove From List

By clicking the Remove button, you can delete the selected file from a send/receive list.

Open List File

If you click the Open List button, the Open File-Transfer List File dialog box appears, allowing you to manipulate the file names in the list.

Save List File

If you click the Save button, the Save File-Transfer List File As dialog-box appears and you can save the list of files.

Changing a List of Files

You can make changes to a list of files to be transferred:

Change the Personal Computer or Host File Name

When you select a file to send or receive, Z and I Emulator for Windows automatically generates a host or personal computer file name by using templates. To change the generated file name, just type over it.

Note:
When receiving a file from an ASCII host, you specify the host file name on the host system.

For receiving files, you can select a personal computer file from the dialog obtained by clicking the Browse button.

Note:
The browse function is not available when receiving files from an ASCII host; it is available when sending files, but only when using the YMODEM or YMODEMG protocols.
Delete File Names From List

To delete a file from the list, select it from the list and click the Remove button.

Add More File Names To List

To add more files to the list, select a file in the PC File list box with Ctrl + left mouse-button, or type a file name in the PC File entry field and press Enter.

Receiving Files from an ASCII Host

Receive File From Host allows you to receive files from a host system to your personal computer; with one command, you can receive a single file or several. If you often receive the same list of files, you can save the list of file names and receive all the files with one command.

For ASCII host file transfer, the host system must support one of two protocols, XMODEM or YMODEM.

Selecting a Workstation Directory

To receive files to a workstation directory, you can key in the directory information or click the Browse button to open the Browse dialog and select the directory; this can be done as part of setting preferences (setting the Default PC Directory field) or at the time of the file transfer.

Selecting Files to Receive

For ASCII host file transfer, select the file to receive on the host system.

Follow these steps to receive one or more files from an ASCII host:

  1. Prepare the host system. The exact method of preparation, including selection of file names, depends on the kind of host system to which you are connected. Contact your host-system administrator for details.
    Note:
    The host system must support one of two protocols: XMODEM or YMODEM.
  2. Click Edit -> Preference -> Transfer to display the Transfer Preferences window. Select the type of protocol you want to use from the drop-down list box on the property page with the General tab.
  3. In the Default PC Directory field, type the workstation directory where the file or files should be sent; or, click the Browse button to open a dialog and select the directory.
  4. To change the transfer parameter defaults for the protocol you selected, click the tab to display the property page for the selected modem protocol.
  5. When all preferences have been set, click OK.
  6. Click Receive File from Host from the Actions menu. The Receive File from Host window appears.
  7. For XMODEM and XMODEM1K, click the Browse button to open a dialog and select a personal computer file name or names, or enter the names in the PC File entry field. The transfer type is automatically generated and appears in the Transfer Type entry-field.
  8. For YMODEM and YMODEMG, select the transfer type and click the Browse button to open a dialog and change the directory, if you desire.
  9. Click the Receive button to display the Receive Files Status window and start the transfer.

Sending Files to an ASCII Host

Send file to host allows you to send files from your personal computer to the host system; with one command, you can send a single file or several files. If you often send the same list of files, you can save the list of file names, and subsequently send all the files with one command.

Note:
This is supported using the YMODEM and YMODEMG protocols only.

Selecting Files to Send

There are several ways to select files to send:

Basic Methods

Type a file name in the PC File field and press Tab; a host file name and a transfer type are generated automatically according to the templates.

Select files from the dialog obtained by clicking the Browse button.

Select from a Send/Receive List

If you have saved a list of file names in a send/receive list, click the Open List button and select the list you want to use; the file names saved in the list appear.

Note:
For ASCII host file transfer, you can use the send/receive list only with the YMODEM and YMODEMG protocols (not with XMODEM or XMODEM1K).

Advanced Method

The Browse window, obtained by clicking the Browse button, displays all the files in the current directory; you can display only certain types of files if you want to.

For example, if the directory has many files and you want to display only files that have the extension .DOC, you can type *.doc in the PC File field and click the Browse button; the resulting dialog shows only files that have the extension .DOC.

Changing the Host File Name or the Transfer Type

When you select a file to send, Z and I Emulator for Windows automatically generates a host file name and selects a transfer type from the default templates. You can change the file name by typing over the text in the Host File field; you can change the transfer type by selecting a different one from the Transfer Type drop-down list.

Saving a List of Files to Send

If you frequently send the same set of files, it is a good idea to save the names in a list, called a send/receive list.

Note:
For ASCII host file transfer, you can use the send/receive list only with the YMODEM or YMODEMG protocols (not with XMODEM or XMODEM1K).

Sending a List of Files

Select the list, then click the Send button.

PC Code Page

When a file is transferred, EBCDIC codes are converted to 1-byte workstation codes, and vice versa. A valid value is automatically selected from among the following values for SBCS sessions: 437, 737, 806, 813, 819, 833, 850, 852, 854, 857, 858, 860, 861, 862, 863, 864, 865, 866, 869, 874, 912, 915, 916, 920, 921, 922, 1008, 1089, 1124, 1125, 1127, 1129, 1131, 1133, 1153, 1155, 1156, 1157, 1158, 1160, 1164, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, and 1258; --according to the host code page specified when the workstation is configured. For an explanation of how to select host code pages, see the online help for the host code page.

Troubleshooting