Sun Adapter for Batch User's Guide

BatchFTP Adapter Connectivity Map Properties

This section describes the configuration parameters for the BatchFTP OTD, accessed from the Connectivity Map.

The BatchFTP Connectivity Map properties include the following sections:

Pre Transfer (BatchFTP Connectivity Map)

Pre-transfer operations are those performed before the file transfer. For more information, see Pre/Post File Transfer Commands.

The Pre Transfer section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 1 Connectivity Map - BatchFTP - Pre Transfer

Name 

Description 

Required Value 

Pre Directory Name

Specifies the directory name (path) on the external system to which a file is renamed or copied. The value can be a literal or a pattern name.

This setting is only for the Rename or Copy operations of the Pre Transfer Command parameter.

For outbound transfers, the directory is created if it does not already exist. 

See Table 1.

See Using Name Patterns.

Enter the exact name of the directory (with the path), enter a pattern name, or select one of the following values: 

  • %f

  • %f.%y%y%y%y%M%M%d%d

    .%h%h%m%m%s%s%S%S%S

  • %f.copy

  • %f.rename

Pre Directory Name Is Pattern

Specifies whether the directory name is interpreted as literal or as a name pattern, as follows:

  • No: indicates that the name entered is a literal, an exact match.

  • Yes: indicates that the name value you enter is assumed to be a name pattern.

    See Table 1.

Select Yes or No.

The configured default is Yes.

Pre File Name

Specifies the file name on the external system, to which a file is renamed or copied. The value represents the file name. The value can be a literal or pattern name.

This setting is only for the Rename or Copy operations of the Pre Transfer Command parameter.

Special characters are allowed, for example, the pattern %f indicates the original working file name.

See Table 1.

See Using Name Patterns.

Enter the exact name of the file, enter a pattern name, or select one of the following values: 

  • %f

  • %f%#

  • %f.%y%y%y%y%M%M%d%d.%h%h

    %m%m%s%s%S%S%S

  • %f.copy

  • %f.rename

Pre File Name Is Pattern

Specifies whether the file name represents a literal or a name pattern, as follows:

  • No: indicates that the name entered is a literal, an exact match. No pattern matching or name expansion is done.

  • Yes: indicates that the name value you enter is assumed to be a name pattern.

    See Table 1.

Select Yes or No.

The configured default is Yes.

Pre Transfer Command

Allows you to execute a desired action directly before the actual file transfer. For an inbound transfer, the file can be made unavailable to other clients polling the target system with the same directory and file pattern or name. For an outbound transfer, you can perform an automatic backup or clean-up of the existing files. The options are:

  • Rename: Rename the target file for protection or recovery.

  • Copy: Copy the target file for backup or recovery.

  • None: Do nothing.

    To gain proper protection, backup, or recovery, you must choose the appropriate setting that serves your purpose. For example, to recover from failures on an outbound appending transfer, use the Copy setting.


    Note –

    When you are using Rename , if the destination file exists, different FTP servers can behave differently. For example, on some UNIX FTP servers, the destination file is overwritten without question. That is, no error or warning message is given. On other FTP servers, a Windows XP server for example, the system generates an error that results in exceptions being thrown in the called OTD method.Be sure you are familiar with the native behavior of the corresponding FTP server. If you are in doubt, try the action at the command prompt. If the action displays an error message, it may result in an exception being thrown in the Collaboration.


Select Rename, Copy, or None.

The configured default is None.


Note –

The Copy option could slow system performance, especially if you are copying a large file.


SOCKS (BatchFTP Connectivity Map)

The BatchFTP SOCKS supports two negotiation methods: NO-AUTHENTICATION and USER/PASSWORD. For more information on SOCKS, see SOCKS.

The SOCKS section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 2 Connectivity Map - BatchFTP - SOCKS

Name 

Description 

Required Value 

Socks Enabled

Specifies whether the FTP command connection goes through a SOCKS server.

If you choose No, the adapter does not connect to a SOCKS server. In this case, all other parameters under the SOCKS section are ignored.


Note –

If this parameter is set to Yes , the host name under the FTP configuration could fail to resolve some names, such as localhost or 127.0.0.1 correctly. Use real IP or machine names to represent the hosts. See Table 11 for more details.


Select Yes or No.

The configured default is No.

Socks Version

Specifies the SOCKS server version. If you choose Unknown, the adapter detects the actual version for you.


Note –

For the best performance, specify the version number, 4 or 5.


Select 4, 5, or Unknown.

The configured default is Unknown.

FTP (BatchFTP Connectivity Map)

The FTP section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 3 Connectivity Map - BatchFTP - Pre Transfer

Name 

Description 

Required Value 

Command Connection Timeout

Allows you to set the timeout of the FTP command/control connection socket. Normally, the larger the file you are transferring, the higher this value must be. Of course, the quality of the network connection also affects this setting.

The value is in milliseconds. A timeout of zero is interpreted as an infinite timeout. 

An integer from 0 to 2147483647.

The configured default is 45000.

Data Connection Timeout

Allows you to set the timeout of the FTP data connection socket. Normally, a slow or busy network connection requires a higher timeout setting.

The value is in milliseconds. A timeout of zero is interpreted as an infinite timeout. 

For setting the timeout of the command/control connection socket, see the parameter Command Connection Timeout.

An integer from 0 to 2147483647.

The configured default is 45000.

Directory Listing Style

Specifies the system that reflects the remote host. This parameter is used to determine the format in which the LIST command returns file-listing information.The Directory Listing Style values include User Defined1 - User Defined10 values. These user defined properties allow you to create multiple user-defined FTP heuristic configurations, and make these selectable from the BatchFTP Adapter properties.

You can create corresponding heuristic configurations in the FtpHeuristics.cfg file under the User Defined sections. For more information on setting user defined FTP heuristic properties, see To Modify the FTP Heuristics Configuration File).


Note –

This property is superseded by any value specified in the User Defined Directory Listing Style property (see Table 3 ). The User Defined Directory Listing Style property value must be blank (empty) to enable the Directory Listing Style property


One of the following values: 

  • UNIX

  • AS400

  • AS400-UNIX

  • HCLFTPD 6.0.1.3

  • HCLFTPD 5.1

  • HP NonStop/Tandem

  • MPE

  • MSFTPD 2.0

  • MSP PDS (Fujitsu)

  • MSP PS (Fujitsu)

  • MVS GDG

  • MVS PDS

  • MVS Sequential

  • Netware 4.11

  • NT 3.5

  • NT 4.0

  • UNIX

  • UNIX (EUC-JP

  • UNIX (SJIS)

  • User Defined

  • User Defined (1-10)

  • VM/ESA

  • VMS

  • VOS3 PDS (Hitachi)

  • VOS3 PS (Hitachi)

  • VOSK (Hitachi)

For more information, see Using FTP Heuristics.

User Defined Directory Listing Style.

Specifies the name of a user-defined directory listing style (heuristics) that is available in the user-created FTP heuristics configuration file located on the logical host.

This property works in conjunction with the properties Table 3 and Table 11.

For details on how to use the User Defined Directory Listing Style seeTo Create a Custom Heuristics Configuration File


Note –

The BatchFTP OTD will generate an exception if a selected User Defined Directory Listing Style or the User Defined Heuristics Configuration File path is not defined correctly. If a User Defined Directory Listing Style is specified, a corresponding value must also be provided for the User Defined Heuristics Configuration File property.


A text string value (default to blank) representing the directory listing style (heuristics) name which is defined in a user supplied heuristics configuration file. 

Use PASV

Allows you to prompt the adapter to enter either the passive or active mode.

Normally, when you connect to an FTP site, the site establishes the data connection to your computer. However, some FTP sites allow passive transfers, meaning that your computer establishes the data connection. 

By default, the passive mode is used. It is recommended that you use this mode for transfers to and from FTP sites that support it. 

The passive mode can be required in the following situations: 

  • For users on networks behind some types of router-based firewalls

  • For users on networks behind a gateway requiring passive transfers

  • If transfers are erratic

  • If data-channel errors are prevalent in your environment

Select Yes or No.

The configured default is Yes.

Mode

Specifies the mode used to transfer data to or from the FTP server, using the Ascii, Binary, or Ebcdic mode.

If you choose Ebcdic, make sure of the following: 

  • Your FTP server supports the EBCDIC mode.

  • You are processing EBCDIC data.

Select Ascii, Binary, or Ebcdic.

The configured default is Binary.

FTP Raw Commands (BatchFTP Connectivity Map)

FTP raw commands are commands that are sent directly to the FTP server.

The FTP Raw Commands section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 4 Connectivity Map - BatchFTP - FTP Raw Commands

Name 

Description 

Required Value 

Post Transfer Raw Commands

Specifies the FTP raw commands to be used directly after the file-transfer command. For example, some SITE commands use a ; (semi-colon) to separate the command set, as displayed in this example:


SITE RECFM=FB;SITE LRECL=50;SITE BLOCKSIZE=32750;SITE

    TRACKS;SITE PRI=5;SITE SEC=5

These commands are sent one by one, in the sequence they are listed. 


Note –

Certain combinations of post-transfer raw commands can cause the loss of data if there is a failure on the FTP server. For example, if the inbound post-transfer command is Delete , and your post-transfer raw commands fail, the deleted file is not recoverable.


One or more valid FTP raw commands. 


Note –

These commands are sent to the FTP server directly and are not interpreted by the adapter in any way.


Pre Transfer Raw Commands

Specifies the FTP raw commands to be used directly before the file-transfer command. For example, some SITE commands use a ; (semi-colon) to separate the command set:


SITE RECFM=FB;SITE LRECL=50;SITE BLOCKSIZE=32750;SITE

    TRACKS;SITE PRI=5;SITE SEC=5

These commands are sent one by one, in the sequence they are listed. 

One or more valid FTP raw commands. 


Note –

These commands are sent to the FTP server directly and are not interpreted by the adapter in any way.


Sequence Numbering (BatchFTP Connectivity Map)

The Sequence Numbering section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.


Note –

The Synchronized property, under General Settings, must be set to “Yes” to use Sequence Numbering.


Table 5 Connectivity Map - BatchFTP - Sequence Numbering

Name 

Description 

Required Value 

Max Sequence Number

Use this parameter when you have set up the target directory or file name to contain a sequence number. It tells the adapter that when this value (the Max Sequence Number) is reached, to reset the sequence number to the Starting Sequence Number value.

This parameter is used for the name pattern %#.

See Using Name Patterns.

An integer from 1 to 2147483647. The value of Max Sequence Number must be greater than that of Starting Sequence Number.

Starting Sequence Number

Use this parameter when you have set up the target directory or file name to contain a sequence number. It tells the adapter which value to start with in the absence of a sequence number from the previous run.

This parameter is used for the name pattern %#.

When the Max Sequence Number value is reached, the sequence number rolls over to the Starting Sequence Number value.

See Using Name Patterns.

An integer from 0 to 2147483647. The value of the Starting Sequence Number must be less than the Max Sequence Number value.

Post Transfer (BatchFTP Connectivity Map)

Post-transfer operations are those performed on remote (ftp) site after the real ftp transfer. For more information on this feature, see Pre/Post File Transfer Commands.

The Post Transfer section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 6 Connectivity Map - BatchFTP - Post Transfer

Name 

Description 

Required Value 

Post Directory Name

Specifies the directory name (path) on the external system to which a file is renamed. The value can be a literal or pattern name.

For an outbound transfer (to destination), the directory is created if it does not already exist. This setting is only for the Rename operation of the Post Transfer Command parameter.

Special characters are allowed, for example, the pattern %f indicates the original working directory name. The expansion of any special characters is carried out each time this parameter is used.

See Table 6.

See Using Name Patterns.

Enter the exact name of the directory (with the path), enter a pattern name, or select one of the following values: 

  • %f

  • %f%#

  • %f.%y%y%y%y%M%M%d

    %d.%h%h%m%m%s%s%S%S%S

  • %f.rename

Post Directory Name Is Pattern

Specifies whether the pattern entered for the directory represents a literal or a name pattern, as follows:

  • No: indicates that the name entered is a literal, an exact match.

  • Yes: indicates that the name value you enter is assumed to be a name pattern.

    See Table 6.

Select Yes or No.

The configured default is Yes.

Post File Name

Specifies the file name to which a file on an external system is renamed. The value represents the file name. The value can be a literal, or pattern name.

This setting is only for Rename operation of Post Transfer Command parameter.

Special characters are allowed. For example, the pattern %f indicates the original working file name.

See Table 6.

See Using Name Patterns.

Enter the exact name of the file, enter a pattern name, or select one of the following values: 

  • %f

  • %f.%y%y%y%y%M%M%d%d.

    %h%h%m%m%s%s%S%S%S

  • %f.rename

Post File Name Is Pattern

Specifies whether the pattern entered for the file name is interpreted as literal or as a name pattern , as follows:

  • No: indicates that the name entered is literal, an exact match. No pattern matching or name expansion is done.

  • Yes: indicates that the name value you enter is a name pattern.

    See Table 6.

Select Yes or No.

The configured default is Yes

Post Transfer Command

Allows you to execute a desired action directly after the actual file transfer or during the “commit” phase.

For an inbound transfer, you can mark the transferred file as “consumed” by making an automatic backup (Rename) or by destroying it permanently (Delete). For an outbound transfer, you can make the transferred file available to other clients by renaming it. The options are:

  • Rename: Rename the transferred file.

  • Delete: Delete the transferred file (inbound transfers only).

  • None: Do nothing.


    Note –

    When you are using Rename , if the destination file exists, different FTP servers can behave differently. For example, on some UNIX FTP servers, the destination file is overwritten without question. That is, no error or warning message is given. On other FTP servers, a Windows XP server for example, the system generates an error that results in exceptions being thrown in the called OTD method.Be sure you are familiar with the native behavior of the corresponding FTP server. If you are in doubt, try the action at the command prompt. If the action displays an error message, it is likely to result in an exceptions being thrown in the Collaboration.


Select Rename, Delete, or None.

The configured default is None.

Target Location (BatchFTP Connectivity Map)

The Target Location section allows you to configure the parameters for the Target Location (remote location) of the FTP directories and files.

The Target Location section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 7 Connectivity Map - BatchFTP - Target Location

Name 

Description 

Required Value 

Append

Specifies whether to overwrite or append the data to the existing file. Use this parameter for outbound FTP transfers only. Choose the appropriate setting as follows:

  • If you select Yes and the target file already exists, the data is appended to the existing file.

  • If you select No, the adapter overwrites the existing file on the remote system.

    If a file with the same name does not exist, both Yes and No create a new file on the external host.

Select Yes or No.

The configured default is No.

Target Directory Name

Specifies the directory on the external system from which files are retrieved or sent. The directory name and path is preferred, otherwise, the path is relative to your home directory when you log on to the FTP server.

The value can be a literal, regular expression (source), or pattern name (destination). 

For outbound FTP operations (destination), the directory is created if it does not already exist. 

See Table 7.

See Using Regular Expressions or Using Name Patterns.

A directory name and path on the target external system. 

Target Directory Name Is Pattern

Specifies whether the directory name is represented as literal, or as a regular expression or name pattern, as follows:

  • No: indicates that the name entered is a literal, an exact match.

  • Yes: indicates that the name value you enter is assumed to be a name pattern or regular expression.

    See Table 7.

Select Yes or No.

The configured default is No.

Target File Name

Specifies the name of the remote FTP file to be retrieved or sent. The value can be a literal, regular expression (get), or pattern name (put).

For MVS GDG systems, the target file name can be the version of the data set, for example: 

For inbound: a literal file name or a regular expression. 

For outbound: a literal file name or name pattern. 

Target File Name Is Pattern

Specifies whether the target file name represents a literal, or as a regular expression or name pattern, as follows:

  • No: indicates that the name entered is a literal, an exact match.

  • Yes: indicates that the name value you enter is assumed to be a name pattern or regular expression.

    See Table 7.

Select Yes or No.

The configured default is Yes.

SSH Tunneling (BatchFTP Connectivity Map)

The SSH Tunneling section provides information for configuring the SSH Tunneling properties. If Secure FTP (FTP over SSH or FTP over SSL) is required, use the Secure FTP OTDs (BatchFTPOverSSL, BatchSFTP, and BatchSCP).

The SSH Tunneling section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 8 Connectivity Map - BatchFTP - SSH Tunneling

Name 

Description 

Required Value 

SSH Channel Established

Specifies whether the adapter needs to launch an SSH subprocess.

Selecting No indicates that the SSH channel has not yet been established. The adapter spawns a subprocess internally then establishes the channel on your behalf.

If you select No, you must set the following parameters:

  • SSH Command Line

  • SSH Listen Port (Environment property)

    If you select No, setting the following parameters is optional:

  • SSH User Name (Environment property)

  • SSH Password (Environment property)

    Selecting Yes indicates that an SSH channel has already been established. That is, the channel has already been started outside the adapter, and the adapter does not need to establish it. For example, you could have issued a command outside of Java CAPS, or you could know that another Batch Adapter instance has already established the channel by the time this adapter runs.

    If you select Yes, you must set the following parameters:

  • SSH Listen Host (Environment property)

  • SSH Listen Port (Environment property)

Select Yes or No.

The configured default is No.

SSH Command Line

Specifies the command line used to establish an SSH channel. This parameter is required only when you set the SSH Channel Established parameter to No.

This entry must be the complete, correct command line required by the additional software application you are using to support SSH tunneling. This command line is executed as it is, so you must be sure of the following: 

  • It contains all the necessary arguments

  • The syntax is correct

  • It is compliant with your SSH-environment

    To verify these requirements, test this command line manually outside of Java CAPS to make sure it works correctly. Execute the command line from the shell and ensure that it does not prompt for any additional user input. If it does, continue to add whatever additional parameters are required until it no longer prompts for additional input, then use that command line in the adapter’s configuration.

    You can specify any other options that are based on your SSH-environment. However, if you do so, you must still be sure this command line is correct and complete. For example, port forwarding could be specified using the following command-line option:

    -L ListenPort:FtpServerHost:FtpServerPort

    In this example, ListenPort must be the same value as that given for the parameter SSH Listen Port. The value given for FtpServerHost overwrites the parameter setting for Host Name under the FTP parameters. The value given for FtpServerPort overwrites the parameter setting for Server Port under the FTP parameters. All other settings under the FTP parameters operate for the specified FTP server: FtpServerHost:FtpServerPort.

    If the SSH channel established by an SSH command line must be shared by other Batch Adapter instances located on different Java CAPS client hosts, you must configure SSH port forwarding to allow non-local connections from other hosts. For some SSH clients, you can use the option -g.


    Note –

    You can also specify port forwarding in your SSH configuration file.


    (Continued on the next page)

A valid SSH command line. 

SSH Command Line (continued)

(Continued from last page)

The command-line syntax can differ, depending on the type of SSH client implementation you are using. See your SSH-tunneling support software user documentation for details. 

Examples: 

ssh -L 3456:ftp.sun.com:21 -o BatchMode=yes apple 

ssh -L 4567:apple:21 -o BatchMode=yes apple 

ssh -L 5678:orange:21 -o BatchMode=yes apple 

ssh -L 6789:orange:21 -g -o BatchMode=yes apple 

plink -L 4567:apple:21 apple 

plink -L 5678:orange:21 apple 

plink -L 6789:orange:21 -g apple 

 

SSH Tunneling Enabled

Specifies whether the FTP command connection is secured through an SSH tunnel.

If you choose No, all other parameters in this section are ignored.


Note –

If you want to use the SSH port-forwarding feature, you may need to reconfigure your FTP server, depending on what kind of server you are using and how it is currently configured. See your SSH documentation for more information.


Select Yes or No.

The configured default is No.

Additional SSH-supporting Software

The adapter’s SSH tunneling (also known as port forwarding) feature utilizes additional existing SSH-supporting software applications, for example, Plink on Windows or OpenSSH on UNIX (see Additional Software Requirements

For different SSH client implementations, the command syntax and environment configuration may vary. See your SSH-supporting application’s user guide for details.

Port-forwarding Configuration

SSH tunneling provides secure FTP command connections. This mechanism is based on an existing SSH port-forwarding configuration. You must configure SSH port forwarding on the SSH listen host before you configure the supporting adapter connection.

For example, on the Java CAPS client host localhost, you can issue a command, such as:


ssh -L 4567:apple:21 -o BatchMode=yes apple

Under the adapter’s configuration for the previous example, you must specify:

In this case, the adapter connects to the FTP server apple:21 through an SSH tunnel. For more information on SSH tunneling, see SSH Tunneling Support.


Note –

It is possible to use SOCKS and SSH tunneling at the same time. However, this practice is not recommended.


General Settings (BatchFTP Connectivity Map)

The General Settings section of the BatchFTP Connectivity Map properties contains the top-level parameters displayed in this table.

Table 9 Connectivity Map - BatchFTP - General Settings

Name 

Description 

Required Value 

Synchronized

Specifically applies to legacy Batch Adapter Projects. Provides backward compatibility to allow Projects that were created using the Batch Adapter version 5.0.7 or earlier to be imported and deployed without a change in the adapters behavior. The selections are: 

  • Yes: Provides backward compatibility for legacy (pre-5.0.8 Batch Adapter) Projects. The adapters run in synchronized mode, one instance of the Collaboration after the other.

  • No: For use with new Batch Adapter Projects. The adapter run in parallel, creating multiple instances of the Collaboration that run in parallel.

    All OTD instances used in a Project should have the same value for this property.


    Note –

    Synchronized must be set to “Yes” to use Sequence Numbering.


Yes or No.

The default setting is Yes, simulating Projects created with Batch Adapter version 5.0.7 or earlier.