File Processor Connector > File Processor Operations > Transferring Files between a Local File System and an FTP or SFTP Server
  

Transferring Files between a Local File System and an FTP or SFTP Server

Use File Processor Connector to transfer files from a local system to an FTP or SFTP server or from an FTP or SFTP server to a local file system. You can use the FTP_PUT and SFTP_PUT objects to upload files from a local system to an FTP or SFTP server. Use the FTP_GET and SFTP_GET objects to download files from an FTP or SFTP location to a local file system.
You can use SFTP_GET, SFTP_PUT, FTP_GET, and FTP_PUT objects to download from and upload to an IBM AS/400 FTP, an IBM z/OS FTP, an IBM AS/400 SFTP, or an IBM z/OS SFTP server.
When you create a synchronization task to connect to an IBM mainframe server, you must add data filter Is_IBM_AS400 and specify its value as 1.

Uploading files from a local system to a SFTP server

You can use the SFTP_PUT, and FTP_PUT object to upload files from a local file system to a SFTP server.
Perform the following steps to create a synchronization task to upload files from a local file system to a SFTP server:
    1In Data Integration, click New > Tasks.
    2Select Synchronization Tasks, and click Create to create a synchronization task.
    The Definition tab appears.
    3Configure the following fields on the Definition tab:
    Field
    Description
    Task Name
    Name of the synchronization task. For example: File_Process_SFTP_PUT
    Description
    Description of the synchronization task. Maximum length is 255 characters.
    Task Operation
    Select Insert.
    4Click Next.
    The Source tab appears.
    5Configure the following fields on the Source tab:
    Field
    Description
    Connection
    Select the connection you created. For example: File_Process_SFTP_PUT
    Source Type
    Select Single.
    Source Object
    Select SFTP_PUT.
    6Click Next.
    The Target tab appears.
    7Configure the following fields on the Target tab:
    Field
    Description
    Connection
    Select the flat file connection.
    Target Object
    Click Create Target.
    Note: The target file display the status of the files that are transferred.
    8Click Next.
    The Data Filters tab appears.
    9Select the filter object, filter field, and filter operator to create a data filter on the Data Filters page.
    The following image shows the Data Filters page:
    Note: When you perform an SFTP_GET, SFTP_PUT, FTP_GET, and FTP_PUT operation, you must specify values to the hostname, password, and userID filter fields to connect to the FTP or SFTP server.
    10Click Next.
    The Field Mapping tab appears.
    11Click Automatch on the Field Mapping tab to map source fields to target fields accordingly.
    12Click Validate Mapping to validate the mapping.
    13Click Save and then Finish.
    14From the Explore page, select the task, and click Actions > Run.
    In Monitor, you can monitor the status of the logs after you run the task.

Downloading Files from an IBM AS/400 FTP, an IBM z/OS FTP, an IBM AS/400 SFTP, or an IBM z/OS SFTP Server

You can use the FTP_GET object to download files from an IBM AS/400 FTP server or an IBM z/OS FTP server to a local file system. You can use the SFTP_GET object to download files from an IBM AS/400 SFTP server or an IBM z/OS SFTP server to a local file system.
Perform the following steps to create a synchronization task to download files from an IBM AS/400 FTP server, an IBM AS/400 SFTP server, an IBM z/OS FTP server, or an IBM z/OS SFTP server to a local file system:
    1In Data Integration, click New > Tasks.
    2Select Synchronization Task, and click Create to create a synchronization task.
    The Definition tab appears.
    3Configure the following fields on the Definition tab:
    Field
    Description
    Task Name
    Name of the synchronization task.
    Location
    The project and folder in which you want to save the taskflow. Click Select to navigate to a folder. You must create a project and folder before you create a taskflow. You cannot create a project or folder from the taskflow creation page. Default: The last folder you viewed on the Explore page. If you do not select a project and folder, and you have not viewed folder on the Explore page, Data Integration saves the taskflow in the location: Default.
    Description
    Description of the synchronization task. Maximum length is 255 characters.
    Task Operation
    Select Insert.
    4Click Next.
    The Source tab appears.
    5Configure the following fields on the Source tab:
    Field
    Description
    Connection
    Select the File Processor connection you created.
    Source Type
    Select Single.
    Source Object
    Select FTP_GET or SFTP_GET.
    Display source fields in alphabetical order
    When selected, displays source fields in alphabetic order. By default, fields appear in the order returned by the source system.
    6Click Next.
    The Target tab appears.
    7Configure the following fields on the Target tab:
    Field
    Description
    Connection
    Select the flat file connection.
    Target Object
    Click Create Target.
    Display technical names instead of labels
    Displays technical names instead of business names.
    Display target fields in alphabetical order
    Displays source fields in alphabetical order instead of the order returned by the source system.
    8Click Next.
    The Data Filters tab appears.
    9Click New. Select the source object, filter field, and define a filter expression on the Data Filters page.
    The following image shows the Data Filters page:
    Note: To connect to an IBM AS/400 FTP server, an IBM AS/400 SFTP server, an IBM z/OS FTP server, or an IBM z/OS SFTP server, you must specify the value of the Is_IBM_AS400 field as 1.
    10Click Automatch on the Field Mapping tab to map source fields to target fields automatically.
    11Click Validate Mapping to validate the mapping.
    12Click Save and then Finish.
    13From the Explore page, select the task, and click Actions > Run.
    In Monitor, you can monitor the status of the logs after you run the task.