Transferring Files

Z and I Emulator for Windows File Transfer enables you to transfer one or more files between a host system and workstation at the same time. Transfer types and translation tables can be defined in advance.

You can perform the following file transfer functions:

Note:

PCT400 was withdrawn from marketing 3/98.

Host Requirements

For PC400 File Transfer in SBCS mode, you need one of the following host file-transfer programs (referred to as APVAFILE):

Sending Files to the Host System

To send a file from your workstation to the host system:

  1. Sign on to the host system.
  2. Click Send File to Host from the Actions menu of the session window. (You can also select the Send button on the tool bar.)

    The Send File to Host window opens.

  3. Specify the name of the workstation file to be sent to the host system by entering the name in the PC File text box, or click the Browse button to open a dialog box for selecting the file.
  4. Enter the name under which the file will be stored on the host; then enter or select the Transfer Type. If a template is provided for the file type you are transferring, the host file name and the transfer type appear automatically.
    Using List Files:
    Select Open List; then select the list to be used for transfer. See Creating List Files for details of how to create list files.
  5. Click Send.

    The file is sent to the host system. The send status appears in the Send a File Status window.

Receiving Files from the Host System

To transfer a file from the host system to your workstation:

  1. Sign on to the host system.
  2. Click Receive File from Host from the Actions menu. (You can also select the Receive button from the tool bar.)

    The Receive File from Host window opens.

  3. Specify the name of the host file to be received. Enter the name in the Host File text box, or specify it as follows:
    Using the Clipboard button:
    If you have copied one or more host file names to the clipboard, you can paste the names into the transfer list; click the Clipboard button to open a dialog box for this. Select one or more of the pasted file names to be transferred. Then click OK.
  4. Enter or modify the suggested name under which the file will be stored on the workstation, and enter or select the Transfer Type; or click the Browse button to open a dialog box for selecting a location for the file.
    Using List Files:
    Select Open List, and select the list to be used for transfer. (See Creating List Files for an explanation of how to create list files.)

    If a template is provided for the file type you are transferring, the workstation file name and the generated transfer type appear automatically.

  5. Click Receive.

    The receive status appears in the Receive a File Status window.

Using List Files

If the same files are transmitted frequently, you can create a list of the files and save it.

A list file can be used for both Send and Receive. The default list file extension is .SRL.

Creating List Files

To create a list file:

  1. Click Receive File from Host from the Actions menu or Send File to Host from the Actions menu of the session window; or click the Send or Receive buttons on the tool bar.

    The corresponding window opens.

  2. Select a file to be transferred from the Host-File Name or PC-File Name list box by pointing to the name of a file to be selected. While holding down the Ctrl key, click the left mouse button.

    The file name, its corresponding workstation or host file name (according to the available templates), and the transfer type appear in the Transfer List part of the window.

    Note:
    You can also click the Browse button (for sending files) or the Clipboard button (for receiving files) to open the corresponding dialog box, which allows you to select files for transferring; when you click OK, the selected files are shown in the Transfer List.
  3. Click the Add to List button to include a selected file in the Transfer List.
  4. After all desired files have been selected, click Save List.

    The Save File-Transfer List File As window opens.

  5. Enter or select a list name, and click OK.

Editing Lists

To edit the contents of a previously created list:

  1. As explained in Sending Files to the Host System and Receiving Files from the Host System, display the Send File to Host or Receive File from Host window.
  2. Select Open List.

    The Open File-Transfer List File window opens.

  3. Select the name corresponding to the list file to be edited, then click OK.
  4. The contents of the selected list appear in the Send File to Host or Receive File from Host window.
  5. Edit the contents of the list file.
    Changing the contents of a list:
    Choose the file to be changed from the list, and overwrite the items to be changed in the text box; then click the Update in List button.
    Removing a file from the list:
    Choose the file to be removed, and click Remove from List.
    Adding a file to the list:
    Double-click the file to be added from the list of host or workstation files.
  6. Select Save List.

    The Save File-Transfer List File As window opens.

  7. Enter a name and then click OK.

Managing Templates

A template is a set of rules to be used by the workstation to automatically generate a workstation or host file name and transfer type when you specify a file to be sent or received.

You can have up to 32 templates. They are automatically numbered from 1 to 32.

When you specify a file to be transferred, the workstation scans the templates, starting from template 1. It uses the first matching template to generate a name for the transferred file and the transfer type.

To manage a template:

  1. Click Receive File from Host from the Actions menu or Send File to Host from the Actions menu of the session window; or click the Send or Receive buttons on the tool bar.

    The Send File to Host or Receive File from Host window opens.

  2. Select Template.

    The Template window opens. The contents of the window depend on the connected host system.

Adding Templates

The list box for the Template window lists the currently stored templates.

To add a template:

  1. Select any template from the list box.

    The contents of the selected template appear under the list box.

  2. Change the workstation or host file names or extensions by overwriting them; then select the transfer type. (For details of the transfer types, see Defining Transfer Types.)
  3. Click Add.

    The window for determining where in the list to display the new template opens.

  4. Select a template number and specify whether to display the new template before or after the template that has that number. Click OK.

    The new template is added to the list in the appropriate position.

Replacing and Deleting Templates

To change the contents of a currently stored template, or to delete a template:

  1. Select the template to be changed or deleted.

    The contents of the selected template appear under the list box.

  2. To change the contents, overwrite the appropriate part and then click Replace.

    To delete a template, click Delete.

    The selected template is changed or deleted, and the contents of the template list box are changed.

Testing Templates

To test the contents of an added or changed template:

  1. Select the template to be tested from the list box.

    The number of the selected template appears in the Test Templates box in the lower part of the window.

  2. Select or enter data for the following items:
    Test Mode
    Determine which mode is to be used for the test: the mode in which a file is transmitted from the workstation to the host system (send), or the mode in which a file is transmitted from the host system to the workstation (receive).
    Templates
    Determine which templates to test: only the template selected in step 1, or all registered templates.
    Source File
    Enter the name of the file to be used for the test.
  3. Click Test.

    Target File indicates the name that has been generated by the template.

Note:
Testing a template does not transfer a file.

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. Text, binary, and append (excluding CICS®) are the defaults.

To add or change transfer types:

  1. Click Preferences -> Transfer from the Edit menu of the session window.
  2. Click the tab for your host type or modem protocol.

    The property page for the selected host or modem protocol opens. The items that appear depend on the selected host system.

  3. Enter transfer-type names in the Transfer Type box, or select them from the drop-down list.
  4. Select or enter the required items (see Items to Be Specified).

    To add or replace a transfer type, click Save. To delete a transfer type, click Delete.

  5. A dialog box displays, asking for confirmation. Click OK.

Items to Be Specified

Choosing the appropriate property page enables you to set the items described in the following sections.

File Options

The file options that can be used depend on the type of the connected host system and the host code page selected when the session was configured. Table 30 lists the mode values for the file transfer options. File Transfer for PC400 lists transfer options.

Table 30. Mode Values for File Transfer Options
Mode Host Code Page
SBCS Others

Logical Record Length (LRECL)

Enter the logical record length to be used (host record byte count) in the LRECL text box. If Variable and Undefined Mode are specified as the record format, the logical record length is the maximum record length within a file. The maximum value is 32767.

The record length of a file sent from a workstation to the host system might exceed the logical record length specified here. If so, the host file transfer program divides the file by the logical record length.

To send a file containing long records to the host system, specify a sufficiently long logical record length.

Because the record length of a workstation file exceeds the logical record length, a message does not appear normally if each record is divided. To display a message, add the following specification to the [Transfer] item of the workstation profile:

DisplayTruncateMessage = Y

Additional Options

The required host command options can be entered in the Additional Options text box.

Setting General Transfer Options

To set advanced options:

  1. Select Preferences -> Transfer from the Edit menu of the session window.

    The setup dialog is displayed.

  2. Change the required settings on the property page labeled General.
  3. Click OK.

The following sections contain information about the items which can be defined for file transfer options.

Data Transfer

You can choose whether the Data Transfer function (see Data Transfer for PC400) is to be used instead of the normal file transfer function.

Host Command

You can specify host command to be called when file transfer starts. If nothing is entered in this text box, APVAFILE is used for 5250 sessions.

Default PC Directory

You can specify the default directory that appears in the Send File to Host or Receive File From Host window. To select the directory, click the Browse button.

Default Library

You can specify the iSeries®, eServer™ i5, or System i5® library to be used as the default.

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.

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 timeout is 30 seconds. 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 or 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 opens. 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 opens.

Setting Up the Translation Table

You can create or edit the translation table to be used for sending or receiving files.

Changing the Translation Table

To change the translation table:

  1. Select Preferences -> Transfer from the Edit menu of the session window.
  2. Click the Translation Table tab on the resulting window.

    The Translation-Table Setup property page opens.

  3. The table currently being used (default or the name of a user-defined table) is shown. Choose either Default or User-Defined.
  4. If you choose User-Defined, enter a translation-table name in the File Name text box, or select a name by clicking Browse.
  5. Click OK.

Customizing the Translation Table

You can create a user-specific translation table for transmission or reception, or you can edit an existing translation table.

To create or edit a translation table:

  1. On the Translation Tables property page, click Customize in the Upload or Download window.

    The Customize Translation window opens.

    If you chose Default or if you chose New from the File menu, the default values appear in the table.

    Translation source codes
    PC code-points when an upload translation table is edited. Host code-points when a download translation table is edited.
    Translation target codes
    Host code-points when an upload translation table is edited. PC code-points when a download translation table is edited.
  2. Double-click the code to be changed in the table, and change the value in the entry field that subsequently appears.
  3. Click Save or Save As from the File menu.
  4. If asked, enter a name in the Save Translation File As window and click OK.
  5. Click Exit from the File menu of the Customize Translation window.

File Transfer for PC400

File transfer is designed so that you can use it in the following cases:

PC File Transfer with the CRLF Option

If the CRLF option is specified, the transfer program checks for new-line characters. If the record length is reached before a new-line character is found, the record is divided at this point; one sentence of a workstation file will become two or more records. Particularly, specify a sufficiently long record length when retransmitting a workstation file containing 2-byte characters.

By default, the message records segmented. is not displayed. To display the message, do the following:

  1. Look for the profile for the session you will use. Normally, this will be in the application data directory under the name filename.WS (filename is a user-specified file name).
  2. Use an editor to insert the following sentence into the [Transfer] section. If there is no [Transfer] section, first enter [Transfer]. Be careful to enter it correctly.
    [Transfer]
    DisplayTruncateMessage=Y

The next time the session is started, this specification becomes active.

Transfer to a Physical Source File

An iSeries, eServer i5, or System i5 physical source file contains 12 bytes of information for each record as internal information: 6 bytes are for a record number, the other 6 bytes are for a date. When you transfer a file from a workstation using file transfer, the date field contains 000000. If the APPEND option is not specified, the record number is incremented by 1, up to a maximum of 9999. Otherwise, it is incremented from the nearest integer, greater than the number of the last record in the original file (for example, 24 for 23.1). If the number of records exceeds 9999, the next and all subsequent record numbers are 9999.

Use the source specifications input utility (SIU) to renumber records when saving the file after editing.

Transfer to a Physical File

A file, such as a PC program, that does not require the processing of the contents of an iSeries, eServer i5, or System i5 file or the reading of data, should be transferred to a physical file with the BINARY transfer type. Because data is not converted, if the data is subsequently retransmitted from the iSeries, eServer i5, or System i5 to a workstation, the original workstation file can be re-created exactly. If the data is converted, however, data might not be restored to its original form, depending on the contents of the conversion table.

For the maximum number of members (MAXMBRS), a physical file attribute, the default value is 1. When a physical file is created during file transfer, MAXMBRS is 1.

When a file is transferred from a workstation to a physical file, the default file name xxxBIN is assumed (xxx is a workstation file extension.) If you transfer more than one file, an error occurs when the second and subsequent files are transferred: The TRANS58 file or member cannot be created. File transfer terminates. A file should be created with the expected file attribute before it is transferred from a workstation to the iSeries, eServer i5, or System i5.

Using the DSPMBRLST Command

For file transfer from the iSeries, eServer i5, or System i5 to a workstation, the Paste function can be used. If the name of the Library/File(Member) to be transferred is copied with the Copy function of the Edit menu, it can be displayed as the host file candidate to be transferred on the transfer request screen by clicking Paste. This is particularly convenient when transferring more than one file at a time.

Use the DSPMBRLST command to list iSeries, eServer i5, or System i5 files or members. The command format is as follows:

DSPMBRLST LIB(lib-name) FILE(file-name)
LIB parameter
The LIB parameter contains the target library name. The default value is *USRLIBL. Extensive specification, such as *ALL, * for generic name, is possible, but is time-consuming. iSeries, eServer i5, or System i5 files or members are listed more efficiently if a specific name is specified.
FILE parameter
The FILE parameter contains the target file name. There is no default value. The parameter must be specified. *ALL and * for generic name can be specified.

Executing this command lists Library/File(Member) on the screen. If they cannot be listed on one screen, MORE... is displayed in the lower right corner of the screen. Use the next page or the preceding page key to scroll the screen. Create a list for Paste with the Copy or the CopyAppend function of the Edit menu, as required.

Restrictions for Transferred File Size

A file that is more than 1 040 000 bytes cannot be transferred correctly.

Using Z and I Emulator for Windows VT