How to use FTP_JOB to transfer files in ESP
search cancel

How to use FTP_JOB to transfer files in ESP

book

Article ID: 50304

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

How do you use FTP_JOB to download mainframe files to a server with an Agent?

How do you use FTP_JOB to upload server files to the mainframe?

 

Environment

Release:  All
Component: ESP Workload Automation

Resolution

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. 

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

FTP_JOB TESTFTP.GDG
  RUN DAILY
  AGENT WINR7
  SERVERADDR SYSA
  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, from a windows server. Note the TRANSFERDIRECTION is U(Upload):

APPL FTPJOB1 WAIT
 
FTP_JOB TESTFTP.GDG
  RUN DAILY
  AGENT WINR7
  SERVERADDR SYSA
  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