The REMOTEFILENAME statement specifies the name of one or more files on a remove server involved in an FTP transfer.
Supported Job Types
This statement is required for the FTP job type.
Syntax
This statement has the following format:
REMOTEFILENAME file_name[; file_name...]
Specifies the source location of the file (if downloading) or the destination of the file (if uploading).
Limits: The total of all files specified cannot exceed 256 characters; case-sensitive
UNIX/Windows:
remotefilename /C:/TEMP/textfile
i5/OS:
/QSYS.LIB/libraryname.LIB/objectname.FILE/membername.MBR
Mainframe:
Notes:
Example: Download a Single File
This example downloads an ASCII file named textfile from the remote UNIX server to the /export/home/ftpfiles/ftpdata directory on the agent computer:
AGENT UNIXAGENT USER test SERVERADDR hprsupp SERVERPORT 5222 TRANSFERDIRECTION D TRANSFERCODETYPE A REMOTEFILENAME /u1/test/ftpdata/textfile LOCALFILENAME /export/home/ftpfiles/ftpdata/textfile_dn
Example: Download Multiple Files
This example downloads multiple ASCII files from a remote UNIX server. Note that the number of files listed in the REMOTEFILENAME and LOCALFILENAME statements must match. Single quotes enclose both lists to accommodate the line continuation character (+).
AGENT UNIXAGENT USER test SERVERADDR hprsupp SERVERPORT 5222 TRANSFERDIRECTION D TRANSFERCODETYPE A REMOTEFILENAME '/u1/test/scripts/echo;+ /u1/test/scripts/echo1;+ /u1/test/scripts/echo2' LOCALFILENAME '/export/home/test/ftpdata/echo;+ /export/home/test/ftpdata/echo_1;+ /export/home/test/ftpdata/echo_2'
Example: Upload a Windows File to a Mainframe Data Set
This example uploads a file named TESTS to the mainframe. By default, the REMOTEFILENAME statement uses the user ID of the logged-on user for the data set high-level prefix.
Note: To specify a different high-level prefix, fully qualify the value of the REMOTEFILENAME statement and wrap double quotes around it.
AGENT WINAGENT LOCALFILENAME 'C:\My Documents\Microsoft Office Directories+ WordPad\tests.txt' REMOTEFILENAME ‘TESTS.DATA' SERVERADDR MAINFRAME.COM TRANSFERCODETYPE U TRANSFERDIRECTION UPLOAD USER causer
Example: Download a Mainframe Data Set to a Windows File
This example downloads the data set member CA07XX01 to a Windows computer. The value of the REMOTEFILENAME statement is fully qualified by wrapping double quotes around the single quotes.
AGENT WINAGENT LOCALFILENAME 'C:\My Documents\File Transfers\ca07xx01.txt' REMOTEFILENAME "'SYS4.CA7.JCLLIB(CA07XX01)'" SERVERADDR MAINFRAME.COM TRANSFERCODETYPE A TRANSFERDIRECTION DOWNLOAD USER lmla
Example: Download Files to a Directory Using a Wildcard
If a wildcard is used for the remote file name, the corresponding local file name (the target) must refer to a directory. In this example, the directory is WC.
AGENT UNIXAGENT USER test SERVERADDR hpunsup SERVERPORT 5222 TRANSFERDIRECTION D TRANSFERCODETYPE A REMOTEFILENAME /u1/test/scripts/r* LOCALFILENAME /export/home/test/ftpdata/WC
Example: Upload a File to a Remote Windows Computer
In this example, a file named textfile is uploaded from a local UNIX computer and copied to a remote Windows computer. Both locations include a complete path in the REMOTEFILENAME and LOCALFILENAME statements. The remote Windows computer uses an agent as the FTP server. Its IP address is 172.16.0.0.
AGENT UNIXAGENT USER test SERVERADDR 172.16.0.0 SERVERPORT 123 TRANSFERDIRECTION U TRANSFERCODETYPE A REMOTEFILENAME /C:/TEMP/textfile LOCALFILENAME /export/home/test/ftpdata/textfile
Example: Download a QSYS.LIB EBCDIC-Encoded File
This example downloads an EBCDIC-encoded file in the QSYS file system from an i5/OS server to another i5/OS system. The file names are specified in the path format.
AGENT I5AGENT USER test SERVERADDR i5agent SERVERPORT 5222 TRANSFERDIRECTION DOWNLOAD TRANSFERCODETYPE E LOCALFILENAME /QSYS.LIB/FTPLIB.LIB/DOWNLOAD.FILE/DATA.MBR REMOTEFILENAME /QSYS.LIB/DATALIB.LIB/DATAFILE.FILE/DATA.MBR
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|