Setting up an FTP Scripting gateway

An FTP Scripting gateway runs according to the schedule you set. The behavior of an FTP Scripting gateway is governed by an FTP command script.

Creating the FTP script

To use an FTP Scripting gateway, you create a file that includes all the FTP commands required that can be accepted by your FTP server.

  1. Create a script for the gateways, to indicate the actions you want performed. The following script is an example of connecting to the specified FTP server (with the name and password specified), changing to the specified directory on the FTP server, and sending all the files to the specified directory on the server.
    open %BCGSERVERIP% %BCGUSERID% %BCGPASSWORD% %BCGOPTIONx%
    cd %BCGOPTIONx%
    mput *
    quit

    The placeholders (for example, %BCGSERVERIP%) are replaced when the gateway is put in service by the values you enter when you create a specific instance of an FTP scripting gateway, as shown in the following table:

    Table 3. How script parameters map to FTP Scripting gateway field entries
    Script parameter FTP Scripting gateway field entry
    %BCGSERVERIP% Server IP
    %BCGUSERID% User ID
    %BCGPASSWORD% Password
    %BCGOPTIONx% Optionx, under User Defined Attributes

    You can have up to 10 user-defined options.

  2. Save the file.

FTP script commands

You can use the following commands when creating the script:

FTP Scripting gateways

If you will be using FTP Scripting gateways, perform the following tasks:

To create FTP Scripting gateways, use the following procedure.

  1. Click Account Admin > Profiles > Gateways.
  2. Click Create.

Gateway Details

From the Gateway List page, perform the following steps:

  1. Type a name to identify the gateway. This is a required field.
  2. Optionally indicate the status of the gateway. Enabled is the default. A gateway that is enabled is ready to send documents. A gateway that is disabled cannot send documents.
  3. Optionally indicate whether the gateway is Online or Offline. The default is Online.
  4. Optionally enter a description of the gateway.

Gateway Configuration

In the Gateway Configuration section of the page, perform the following steps:

  1. Select FTP Scripting from the Transport list.
  2. Enter the IP address of the FTP server to which you are sending documents. The value you enter here will replace %BCGSERVERIP% when the FTP script is run.
  3. Enter the user ID and password required to access the FTP server. The values you enter here will replace %BCGUSERID% and %BCGPASSWORD% when the FTP script is run.
  4. If the target is in secure mode, use the default of Yes for FTPS Mode. Otherwise, click No.
  5. Upload the script file by following these steps:
    1. Click Upload Script File.
    2. Type the name of the file that contains the script for processing documents, or click Browse to navigate to the file.
    3. Click Load File to load the script file into the Currently loaded script file text box.
    4. If the script file is the one you want to use, click Save.
    5. Click Close Window.
  6. In the Retry Count field, enter the number of times you want the gateway to attempt to send a document before it fails. The default is 3.
  7. In the Retry Interval field, enter the amount of time the gateway should wait before attempting to send the document again. The default is 300 seconds.
  8. For Connection Timeout, enter the number of seconds a socket will remain open with no traffic. The default is 120 seconds.
  9. In the Lock User field, indicate whether the gateway will request a lock, so that no other instances of an FTP Scripting gateway can gain access to the same FTP server directory at the same time.

User-defined Attributes

If you want to specify additional attributes, perform the following steps. The value you enter for the option will replace %BCGOPTIONx% when the FTP script is run (where x corresponds to the number of the option.)

  1. Click New.
  2. Type a value next to Option 1
  3. If you have additional attributes to specify, click New again and type a value.
  4. Repeat step 3 as often as necessary to define all the attributes.

For example, suppose your FTP script looked like this:

Open %BCGSERVERIP% %BCGUSERID% %BCGPASSWORD%
           cd %BCGOPTION1%
           mput *
           quit  

The %BCGOPTION% in this case would be a directory name.

Schedule

From the Schedule section of the page, perform the following steps:

  1. Indicate whether you want interval-based scheduling or calendar-based scheduling.
  2. If you want to configure the Preprocess or Postprocess step for the gateway, go to Configuring handlers. Otherwise, click Save.

Copyright IBM Corp. 2003, 2005