How to use FTP_JOB to transfer files in CA Workload Automation ESP Edition.

Document ID : KB000050304
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

How do you use FTP_JOB to download mainframe files to a server with an Agent? Also how do you use FTP_JOB to upload server files to the mainframe?

Solution:

The FTP_JOB workload object(WOB) is used to transfer data between mainframe and distributed server provided a System Agent is installed on the Server. When using this WOB the mainframe file is always the REMOTEFILENAME and the distributed file is LOCALFILENAME. Also, note the TRANSFERDIRECTION is what tells ESP whether to download a file or upload from server. The USER needs to be defined to ESP using the PASSWORD command. This can be found in the Command Reference Guide.

Here is an example of how to DOWNLOAD a file to a mainframe file to a windows server. Note the TRANSFERDIRECTION is D(download):

FTP_JOB TESTFTP.GDG
  RUN DAILY
  AGENT WINR7
  SERVERADDR CA31
  SERVERPORT 21
  TRANSFERDIRECTION D
  FTPFORMAT A
  REMOTEFILENAME '''XXX.XXXX.XXXX.'''   <====== This is the mainframe file name.
                                                The mainframe is always REMOTEFILENAME and surrounded by three single quotes.
  LOCALFILENAME 'C:\My Documents\TEST\TESTFTP\test.txt'
  user UUUUUU
ENDJOB

Here is an example of how to UPLOAD a file to a mainframe file to a windows server. Note the TRANSFERDIRECTION is U(Upload):

APPL FTPJOB1 WAIT
 
FTP_JOB TESTFTP.GDG
  RUN DAILY
  AGENT WINR7
  SERVERADDR CA31
  SERVERPORT 21
  TRANSFERDIRECTION U
  FTPFORMAT A
  REMOTEFILENAME  '''XXX.XXXX.XXXX'''   <====== This is the mainframe file name.
                                        The mainframe is always REMOTEFILENAME and surrounded by three single quotes.
  LOCALFILENAME 'C:\My Documents\TEST\TESTFTP\test.txt'
  user UUUUUU
ENDJOB