Previous PageNext Page

Chapter 6 - Transferring Files

CICS (Customer Information Control System)
VM/CMS (Virtual Machine/Conversational Monitor System)
MVS/TSO (Multiple Virtual Systems/Time Sharing Option)

Requirements for Transferring Files

Procedure for Transferring Files

1. Obtain the name of the file transfer program that is running on the host. Advanced 3270/SNA expects the program name for the host portion of file transfer to be IND$FILE.

If the program has a different name, you must notify the file transfer software using the DOS SET command. You can enter the SET command at the keyboard before you run SNA_SND or SNA_RCV, or include it in a DOS batch file. The format for the command is:

SET IND$FILE = NEWNAME

When you enter either the SNA_SND or SNA_RCV command at the PC, Advanced 3270/SNA starts the IND$FILE program on the host.

2. Run the emulator software. (See the section in Chapter 2 entitled "Running Advanced 3270/SNA Software" for complete details.)

3. Log on to the host.

4. Press the Hotkey to go to DOS.

5. Run SNA_SND or SNA_RCV using the command syntax indicated in the next section.

File Transfer Command Syntax

Sending Files to a CICS Host

SNA_SND [/MT=n] [/SM] [/DS] [/SW] [/SN=a] [/TI=n] pcfile hostfile [(options] [)comments]

Receiving Files From a CICS Host

SNA_RCV [/MT=n] [/SM] [/DS] [/SW] [/SN=a] [/TI=n] pcfile hostfile [(options] [)comments]

Sending Files to a VM/CMS Host

SNA_SND [/MT=n] [/SM] [/DS] [/SW] [/SN=a] [/TI=n] pcfile hostfile type [(options]

Receiving Files From a VM/CMS Host

SNA_RCV [/MT=n] [/SM] [/DS] [/SW] [/SN=a] [/TI=n] pcfile hostfile type [mode] [(options]

Sending Files to an MVS/TSO Host

SNA_SND [/TI= n] [/MT= n] [/SM] [/DS] [/SW] [/SN=a] pcfile datasetname [(membername)] [/password] [options]

Receiving Files from an MVS/TSO Host

SNA_RCV [/TI=n] [/MT=/n] [/SM] [/DS] [/SW] [/SN=a] pcfile datasetname [(membername)] [/password] [options]

Required File Transfer Command Parameters

Required Command Parameters for CICS

SNA_SND pcfile hostfile
SNA_RCV pcfile hostfile

Required Command Parameters for VM/CMS

SNA_SND pcfile hostfile type
SNA_RCV pcfile hostfile type

Required Command Parameters for MVS/TSO

SNA_SND pcfile datasetname
SNA_RCV pcfile datasetname

Command Line Switches

Note: If you set the timeout value to 0, the workstation keyboard will lock when an error occurs during file transfer. The TI=0 switch sets an infinite timeout, so the Advanced 3270/SNA software waits forever on the host.

Command Line Options

SNA_SND A:CLIENTS.BAS SOEAST BASIC A1 (ASCII CRLF RECFM F

AVBLOCK(n) where n is the Average Block Length, in bytes, to allocate on the host. This parameter is used primarily for transfers where the record format parameter (RECFM) is specified as undefined (U).
TRACKS is the number of tracks to allocate on the host hard disk.
CYLINDERS is the number of cylinders to allocate on the host hard disk.

Examples of the SPACE Parameter

SPACE(20,10) tracks

SPACE(30,5) cylinders

SPACE(20) avblock(10)

File Transfer with CICS

CICS File Storage

The host stores files you send it in a temporary storage queue.
Each item in the queue represents a logical record.
Items in the queue need not be of the same length.
The maximum allowable length of a record is 32,767 bytes.
If you send the host a file that exceeds the size of the storage queue or is longer than 32,767 bytes, the file transfer might fail.

SNA_SND and Null Records

SNA_RCV and Null Characters

Command Options for CICS

ASCII
BINARY
CRLF
NOCRLF

Examples of CICS File Transfers

1. The SHOWS.BAT file in the SCHEDULES directory on drive E is transferred to a host file named TSHOWS. The command includes the ASCII option and a comment.

SNA_SND E:\schedules\shows.bat tshows (ascii)schedule

2. The LABELS.EXE file on drive C is transferred to the host file MLABELS. The command includes the BINARY option and a comment.

SNA_SND C:labels.exe mlables (binary)address labels

3. The host transfers the file ECNA711 to a PC file named ENGCHNGE.BAT on the default drive. Advanced 3270/SNA sends the file to the PC as an ASCII text file.

SNA_RCV engchnge.bat ecna711 (ascii

4. The SNA_RCV program transfers the file TIMEMGT to a PC file named CALENDAR.EXE in the SCHEDULES directory on drive D. Advanced 3270/SNA sends the file to the PC as a BINARY file.

SNA_RCV d:\schedules\calendar.exe timemgt (binary

File Transfer with VM/CMS

Command Options for VM/CMS

APPEND use only with SNA_RCV
ASCII
BINARY
CRLF
LRECL (n) use only with SNA_SND
NOCRLF
RECFM F use only with SNA_RCV
RECFM V use only with SNA_RCV

Examples of VM/CMS File Transfers

1. In this example, SNA_SND transfers a copy of the PC file SALES.BAS on drive C to the host file NOWEST. NOWEST is of the type BASIC and mode A1. ASCII directs the host to convert the file to EBCDIC. CRLF deletes the CR (carriage return) and LF (line feed) characters that mark the end of the file's logical records. RECFM V identifies the records as variable length.

SNA_SND C:Sales.bas Nowest basic a1 (ascii crlf recfm v

2. In the next example, the SNA_RCV program transfers a copy of the host file MAIL (of type BASIC and mode A1) to a PC file named MAILIST.BAS on drive B. The ASCII option converts the host file to ASCII code, and the CRLF option inserts CR and LF characters at the end of each line.

SNA_RCV b:mailist.bas mail basic a1 (ascii crlf

File Transfer with MVS/TSO

Command Options for MVS/TSO

APPEND use only with SNA_SND
ASCII
BINARY
BLKSIZE use only with SNA_SND
CRLF
LRECL use only with SNA_SND
NOCRLF
RECFM F use only with SNA_SND
RECFM V use only with SNA_SND
RECFM U use only with SNA_SND
SPACE use only with SNA_SND

Examples of MVS/TSO File Transfers

1. SNA_SND transfers a copy of the PC file PAYROLL.BAS on drive D to the host data set PAY.BASIC. /PROTECTS is a password. LRECL sets the logical record length at 132 to override the default value of 80. RECFM f specifies a fixed length record format. SPACE allocates a total of 20 tracks in increments of ten for the new data set.

SNA_SND d:payroll.bas pay.basic /protects lrecl(132) recfm(f) space (20,10) tracks

2. File PAYROLL.BAS on drive D is transferred to the host data set PAY.BASIC. This command includes a member name (RATE85) and specifies a block size of 128 bytes.

SNA_SND d:payroll.bas pay.basic (rate85) blksize(128)

3. SNA_RCV transfers a copy of the data set SALES.BASIC to the PC file SALES.BAS on drive D. /PROTECT is a password. (The file is not password protected on the PC.)

SNA_RCV b:sales.bas sales.basic /protects

4. SNA_RCV transfers a copy of the data set FINSTAT85 to the PC file REPORTS.TXT on drive C. /ADMIN is a password. The command uses ASCII and CRLF options because it is transferring text files.

SNA_RCV c:reports.txt finstat85 /admin ascii crlf

Interrupting File Transfer

TRANS53 Break requested, please wait

^C

 

Previous PageTop Of PageNext Page