FileTransfer - initiate a file transfer

Return to Introduction  Previous page  Next page

PC to Host:

FileTransfer        Operation={send | $variable},        

       PcFile={PC filename | $variable},        

       HostFile={Host filename | $variable},        

       Opsys={vm/cms | cics | mvs/tso | $variable},        

       [Blksize={blksize | $variable},]        

       [Lrecl={lrecl | $variable},]        

       [Recfm={default | fixed | variable | undefined | $variable},]        

       [Mode={WSF | ScreenImage | $variable},]        

       [BufferSize={ buffsize | $variable},]        

       [Language={language | $variable},]        

       [Options={options | $variable},]        

       [Program={program | $variable}]        

Host to PC:

FileTransfer        Operation={receive | $variable},        

       PcFile={PC filename | $variable},        

       HostFile={Host filename | $variable},        

       Opsys={vm/cms | cics | mvs/tso | $variable},        

       PCOptions={replace | append | prompt | $variable},        

       [Mode={WSF | ScreenImage | $variable},]        

       [BufferSize={ buffsize | $variable},]        

       [Language={language | $variable},]        

       [Options= {options | $variable},]        

       [Program={program | $variable}]        

 

Where:

 

$variableis a variable. The text defined for the variable is substituted for the variable name. A variable may be used in place of any of the FileTransfer command keyword parameters.        
 
sendsend a file from the PC to the session host computer (upload). This parameter is not case sensitive.        
 
receivemove a file from the session host computer to the PC (download). This parameter is not case sensitive.        
 
PC filenameis the full filename, including drive letter and path, of a PC file. Enclose the PC filename in double quotation marks ("") if it contains embedded spaces or commas.        
 
Host filenameis the name of a file on the host computer. Enclose the Host filename in double quotation marks ("") if it contains embedded spaces or commas.        
 
vm/cms | cics | mvs/tsois the operating system on the host computer. Specify "vm/cms", "cics" or "mvs/tso."        
 
blksizeis the block size for the transferred file. A valid blksize is between 1 and 32760. (MVS/TSO send operations only)        
 
lreclis the logical record length for the transferred file. A valid lrecl is between 1 and 32760. (Send operations only)        
 
default | fixed | variable | undefinedis the record format for the host file. Specify one of the following: "default", "fixed", "variable" or "undefined". (Send operations only)        

 

defaultuse the default record format for the host system.        
fixedindicates fixed length records.        
variableindicates variable length records.        
undefined indicates the record format is not defined.        

 

replace | append | promptis one of the following options: "replace", "append" or "prompt". (Receive operations only)        

 

replaceif the PC file already exists, replace it with the download file.        
appendif the PC file already exists, add the download file to the end of the existing file.        
promptif the PC file already exists, prompt the user to replace the file or cancel the transfer operation.        

 

WSF | ScreenImageis the type of file transfer. WSF indicates a Write Structured Field file transfer with the buffer size specified in the BufferSize parameter. Screen images indicates a screen image file transfer. The default is WSF.        

 

buffsizeis the buffer size for WSF file transfers. A valid buffsize is between 512 and 65535. The default is 2048.        
 
languagespecify the name of the host language code page (*.cpg) to use for this file transfer operation. If a language file is not specified, the host language code page defined for the session is used by default.        
 
optionsspecify other IND$FILE options. The options in this parameter are passed directly to IND$FILE exactly as they appear. There is no editing of the options in this field. This allows you to pass options specific to your version of IND$FILE. Enclose the options string in double quotation marks ("") if it contains embedded spaces or commas. Some common options are:        

 

asciiConverts ASCII to EBCDIC when the PC sends a file to the host, and converts EBCDIC to ASCII when the PC receives a file from the host.        
crlfReplaces the carriage return/line feed characters with line breaks when the PC sends a file to the host, and replaces line breaks with carriage return/line feed characters when the PC receives a file from the host.        
appendAppends the transferred file to the host file. (Send operations only.)        
notrunc(z/OS (MVS) and VM) Do not truncate trailing blanks.        
blank(CICS) Do not truncate trailing blanks.        

 

z/OS (MVS) file transfers        

 

space(pri [,sec]) tracks | cylinders | avblock(size)        
       specify the space allocation for a new data set (Send only). Where:
pri is the primary allocation.
secis the secondary allocation.
size is the number of bytes in an avblock.

tracks | cylinders | avblock(size) indicates the unit of allocation.

 

Examples: 

 

space(15,1) tracks 

space(2,1) cylinders  

space(15,1) avblock(1024)

 

VSE file transfers        

 

file=rdr | lst | punspecify the POWER queue location for the host file. (VSE file transfers only)        
file=tsspecify the host file location is in CICS/VSE temporary storage. (VSE file transfers only)        
file=libspecify the host file is in a VSE library. (VSE file transfers only)        
l=libnamespecify the name of the VSE library. (VSE file transfers only)        
s=sublibspecify the name of the VSE sublibrary. (VSE file transfers only)        

 

programspecify the file transfer program name. By default the program name is IND$FILE.        

 

The FileTransfer command initiates a file transfer. File transfer operations are only valid for 3270 sessions.

 

Examples

 

FileTransferoperation=send,

pcfile=e:\download\testfile.txt,

hostfile="testfile upload a",

opsys=vm/cms,

lrecl=80,

recfm=fixed,

options="ascii crlf"        

 

FileTransferoperation=receive,

pcfile=e:\download\testfile.txt,

hostfile="testfile upload a",

opsys=vm/cms,

pcoptions=prompt, o

options="ascii crlf"        

 

FileTransferoperation=receive,

pcfile=e:\test.txt,

hostfile="test file a",

opsys=vm/cms,

pcoptions=prompt,

language="C:\Program Files\SDI\TN3270 Plus\france.cpg",

options="ascii crlf"        

 

FileTransferoperation=send,

pcfile=e:\test.txt,

hostfile='APPL.TEST.DSN(TEST)',

opsys=mvs/tso,

options="ascii crlf"        

 

FileTransferoperation=receive,

pcfile=e:\test.txt,

hostfile='APPL.TEST.DSN(TEST)',

opsys=mvs/tso,

mode=wsf, buffersize=65535,

pcoptions=prompt,

options="ascii crlf"        

 

The following script transfers file "profile exec a" from the VM/CMS host to "C:\download\profile.txt" on the PC.

 

FileTransferoperation=receive,

pcfile=c:\download\profile.txt,

hostfile="profile exec a",

opsys=vm/cms, pcoptions=prompt,

options="ascii crlf"        

exit        

 

The following script sends file "C:\download\profile.txt" on the PC to "test exec a" on the VM/CMS host.

 

FileTransferoperation=send,

pcfile=c:\download\profile.txt,

hostfile="test exec a",

opsys=vm/cms,

lrecl=80,

recfm=default, options="ascii crlf"        

exit        

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.