JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Adapter for Batch User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Oracle Java CAPS Adapter for Batch User's Guide

About the Adapter for Batch

Batch Adapter OTDs

Additional Licensing Considerations

Installing the Batch Adapter

Batch Adapter System Requirements

Installing the Batch Adapter

Monitoring and Alerts

Using the Enterprise Manager

Installing Adapter Enterprise Manager plug-ins

Batch Adapter Alert Codes

Configuring the Batch Adapter

Creating and Configuring Batch Adapters

Selecting a Batch External Application

Modifying the Adapter Properties

Using the Properties Editor

Batch Adapter Properties

BatchFTP Adapter Connectivity Map Properties

Pre Transfer (BatchFTP Connectivity Map)

SOCKS (BatchFTP Connectivity Map)

FTP (BatchFTP Connectivity Map)

FTP Raw Commands (BatchFTP Connectivity Map)

Sequence Numbering (BatchFTP Connectivity Map)

Post Transfer (BatchFTP Connectivity Map)

Target Location (BatchFTP Connectivity Map)

SSH Tunneling (BatchFTP Connectivity Map)

Additional SSH-supporting Software

Port-forwarding Configuration

General Settings (BatchFTP Connectivity Map)

BatchFTP Adapter Environment Properties

SOCKS (BatchFTP Environment)

FTP (BatchFTP Environment)

General Settings (BatchFTP Environment)

SSH Tunneling (BatchFTP Environment)

Connection Pool Settings (BatchFTP Environment)

Connection Retry Settings (BatchFTP Environment)

BatchFTPOverSSL Adapter Connectivity Map Properties

Pre Transfer (BatchFTPOverSSL Connectivity Map)

FTP and SSL Settings (BatchFTPOverSSL Connectivity Map)

Post Transfer (BatchFTPOverSSL Connectivity Map)

Firewall Settings (BatchFTPOverSSL Connectivity Map)

Synchronization (BatchFTPOverSSL Connectivity Map)

BatchFTPOverSSL Adapter Environment Properties

FTP and SSL Settings (BatchFTPOverSSL Environment)

Firewall Settings (BatchFTPOverSSL Environment)

General Settings (BatchFTPOverSSL Environment)

Connection Pool Settings (BatchFTPOverSSL Environment)

Connection Retry Settings (BatchFTPOverSSL Environment)

BatchSCP Adapter Connectivity Map Properties

SCP Settings (BatchSCP Connectivity Map)

Firewall Settings (BatchSCP Connectivity Map)

Synchronization (BatchSCP Connectivity Map)

BatchSCP Adapter Environment Properties

SSH Settings (BatchSCP Environment)

Firewall Settings (BatchSCP Environment)

General Settings (BatchSCP Environment)

Connection Pool Settings (BatchSCP Environment)

Connection Retry Settings (BatchSCP Environment)

BatchSFTP Adapter Connectivity Map Properties

Pre Transfer (BatchSFTP Connectivity Map)

SFTP Settings (BatchSFTP Connectivity Map)

Post Transfer (BatchSFTP Connectivity Map)

Firewall Settings (BatchSFTP Connectivity Map)

Synchronization (BatchSFTP Connectivity Map)

BatchSFTP Adapter Environment Properties

SFTP Settings (BatchSFTP Environment)

Firewall Settings (BatchSFTP Environment)

General Settings (BatchSFTP Environment)

Connection Pool Settings (BatchSFTP Environment)

Connection Retry Settings (BatchSFTP Environment)

BatchLocalFile Connectivity Map Properties

Pre Transfer (BatchLocalFile Connectivity Map)

Sequence Numbering (BatchLocalFile Connectivity Map)

Post Transfer (BatchLocalFile Connectivity Map)

General Settings (BatchLocalFile Connectivity Map)

Target Location (BatchLocalFile Connectivity Map)

BatchLocalFile Environment Properties

General Settings (BatchLocalFile Environment)

Connection Pool Settings (BatchLocalFile Environment)

BatchRecord Connectivity Map Properties

General Settings (BatchRecord Connectivity Map)

Record (BatchRecord Connectivity Map)

BatchRecord Environment Properties

Connection Pool Settings (BatchRecord Environment)

BatchInbound Connectivity Map Properties

Settings (BatchInbound Connectivity Map)

BatchInbound Environment Properties

MDB Settings (BatchInbound Environment)

Using FTP Heuristics

FTP Heuristics

Platform Selection

IBM IP Stack Required for MVS Sequential, MVS GDG, and MVS PD

Creating User Defined Heuristic Directory Listing Styles

Considerations

Heuristics Configuration File Format

FTP Heuristics Configuration Parameters

Commands Supported by FTP Server

Header Lines To Skip

Header Indication Regex Expression

Trailer Lines To Skip

Trailer Indication Regex Expression

Directory Indication Regex Expression

File Link Real Data Available

File Link Indication Regex Expression

File Link Symbol Regex Expression

List Line Format

Valid File Line Minimum Position

File Name Is Last Entity

File Name Position

File Name Length

File Extension Position

File Extension Length

File Size Verifiable

File Size Position

File Size Length

Special Envelope For Absolute Path Name

Listing Directory Yields Absolute Path Names

Absolute Path Name Delimiter Set

Change Directory Before Listing

Directory Name Requires Terminator

FTP Configuration Requirements for AS400 UNIX (UFS)

Dynamic Configuration

Dynamic Configuration Sample

Dynamic Configurable Parameters for Secure FTP OTDs

Configuration Parameters that Accept Integer Values

Understanding Batch Adapter OTDs

Overview of the Batch OTDs

Types of Batch Adapter OTDs

OTD Functions

BatchFTP OTD

BatchFTP OTD Structure

Configuration Node

Client and Provider Nodes

BatchFTP OTD Node Functions

Using the BatchFTP OTD

Handling Type Conversions

Code Conversion and Generation

Type Conversion Troubleshooting

Essential BatchFTP OTD Methods

Sequence Numbering

Additional FTP File Transfer Commands

BatchFTPOverSSL OTD

BatchFTPOverSSL OTD Structure

BatchFTPOverSSL OTD Node Functions

Configuration Node

BatchFTPOverSSL Client Node

BatchSFTP OTD

BatchSFTP OTD Structure

BatchSFTP OTD Node Functions

Configuration Node

BatchSFTP Client Node

BatchSCP OTD

BatchSCP OTD Structure

BatchSCP OTD Node Functions

Configuration Node

BatchSCP Client Node

BatchLocalFile OTD

BatchLocalFile OTD Structure

Configuration Node

Client Node

BatchLocalFile OTD Node Functions

Using the BatchLocalFile OTD

BatchLocalFile Specific Features

Pre/Post File Transfer Commands

Pre Commands

Post Commands

Essential BatchLocalFile OTD Methods

Resume Reading Feature

General Operation

Step-by-step Operation

Operation Without Resume Reading Enabled

To Avoid Storing a Resume Reading State

Data Stream-Adapter Provider

Sequence Numbering

Generating Multiple Files with Sequence Numbering

Handling Type Conversions

Recommended Practice

Example 1: Parsing a Large File

Example 2: Slow, Complex Query

OTD Limitations

BatchRecord OTD

BatchRecord OTD Structure

OTD Structure and Operation

Record-processing OTD Node Functions

Using the Record-processing OTD

Using get() and put()

Choosing the Parse or Create Mode

Creating a Payload

Parsing a Payload

Fully Consuming a Payload

Using Record Processing with Data Streaming

BatchInbound OTD

BatchInbound OTD Structure

Using Regular Expressions

Regular Expressions: Overview

Entering Regular Expressions

Regular Expressions and the Adapter

Rules for Directory Regular Expressions

Restrictions for Using Regular Expressions as Directory Names

Regular Expression Directory Name Examples

Using Name Patterns

Types of Name Patterns

Resolving Names

Date/time Format Syntax

Additional Batch Adapter Features

What's in This Chapter

Streaming Data Between Components

Introduction to Data Streaming

Overcoming Large-file Limitations

Using Data Streaming

Data-streaming Operation

Data Streaming Versus Payload Data Transfer

Data Streaming Scenarios

Consuming-stream Adapters

Stream-adapter Interfaces

Inbound Transfers

Outbound Transfers

SOCKS FTP Support

SOCKS

SOCKS: Overview

SOCKS Proxy Server

SOCKS and the Batch Adapter

Negotiation Methods

SOCKS Configuration Properties

SSH Tunneling Support

SSH Tunneling: Overview

Additional Software Requirements

SSH Tunneling and the Batch Adapter

Enabling SSH Tunneling

Using an Existing Channel

Using an Internal Channel

Port-forwarding Configuration

SSH Tunneling Configuration Parameters

BatchLocalFile OTD

The BatchLocalFile OTD provides access to files on your local system. While file access is not always necessary in Java CAPS, it makes sense for the Batch Adapter to have this feature because file processing is one of its core functions.

Additional BatchLocalFile features include regular expressions for accessing files and a sequence-numbering scheme for creating files.

BatchLocalFile OTD Structure

The BatchLocalFile OTD contains four top-level nodes, Client, Configuration, PersistentState, and State Manager. Expand these nodes to reveal additional sub-nodes.

Figure 7 BatchLocalFile OTD Structure

image:Image displays the BatchLocalFile OTD Structure

Configuration Node

As it is with each of the Batch OTDs, each field sub-node under the Configuration node in the BatchLocalFile OTD corresponds to one of the adapter’s configuration parameters for that OTD. See BatchLocalFile Connectivity Map Properties for details.

Client Node

This OTD includes an additional top-level node, the Client. This node implements its respective functionality interface in the adapter.

The client interface represents how the functionality of the OTD is actually used. This functionality includes the basic operations and features of the OTD. The client interface provides the OTD’s the file services those who want to use them.

BatchLocalFile OTD Node Functions

The following list explains the nodes in the BatchLocalFile OTD, including primary functions:

Using the BatchLocalFile OTD

This section explains how to use the BatchLocalFile OTD’s features.

There is no required particular order for the calls that can be made on the BatchLocalFile OTD. The only required call is reset() after a transfer, if it is used for more than one transfer per Collaboration Rule execution. An example of this would be a dynamic batch order with multiple files to be transferred.

If you are using a Java Collaboration to generate multiple files with sequence numbers, using the BatchLocalFile interface, you must call the reset() method to indicate the end of one file and the start of the next one.

BatchLocalFile Specific Features

Using the BatchLocalFile OTD to read records from a local file has the following advantages:

For more information on the Resume Reading feature, see Resume Reading Feature.

Pre/Post File Transfer Commands

The adapter has features that allow you to execute desired actions directly before or after the actual file transfer. You can enter these settings at the adapter configuration parameters or in the Configuration node of the desired OTD.

These features are available with both the BatchLocalFile OTD and the BatchFTP OTD.

Pre Commands

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 (Rename). For an outbound transfer, you can perform an automatic backup of the existing file (Copy).

Your pre-transfer options are:

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. When specifying file and directory names you can use regular expressions, special characters, or both.

Post Commands

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. When specifying file and directory names you can use regular expressions, special characters, or both.

Your post-transfer options are:

For more information on Pre and Post Transfer commands see the following:

BatchFTP OTD

BatchLocalFile OTD

Essential BatchLocalFile OTD Methods

In addition to the field elements, the BatchLocalFile OTD’s Client node contains methods that extend the client interface functionality of the adapter. These methods are essential to the proper use of the OTD. These methods include:

Resume Reading Feature

The purpose of this feature is to allow an application to read large files in parts instead of processing the whole file at once. Resume Reading allows your system to read files in a number of subsequent Business Rule executions, when you are using data streaming.

General Operation

The Resume Reading feature’s operation is achieved by keeping persistent information about the current successful file read operation, breaking, then resuming the next read operation from that last stored break position. As a result, the current file is read in parts, and the beginning and end of each part is determined by a predefined break condition.

You determine the break condition through the definition of your Business Rules. Since the Resume Reading feature operates based on reading one part of a file at a time per Business Rule, these rules must determine the break. Each Business Rule executes reading a part of the file, breaks, then passes to the next rule, which reads the next part up to the break, and so on, until the entire file is read.

A break condition can be any type of stopping point you determine in your Collaboration Rules. For example, this condition could be a fixed number of records, a delimiter, or reaching a specific character string.

The Client node in the OTD has a read-only property (ResumeReadingInProgress node) indicating whether there is a resume-reading operation in progress. This node is for informational purposes only. Also, the Resume Reading feature is available in the data-streaming mode only.

The feature has no special operational requirements besides setting the adapter configuration option. The adapter configuration has an option to enable or disable this feature. This option is also accessible at run time.


Note - If this feature is enabled, the adapter always checks first for a resume-reading operation in progress. If this feature is not in progress, the adapter determines the next file based on the adapter configuration settings.


Step-by-step Operation

The diagram below illustrates how the Resume Reading feature operates along with pre- and post-file-transfer commands. In this example, the Collaboration executes the same Business Rule four times. Each execution causes the Collaboration to read another section of the file. When the Collaboration reads the final records, it executes the Post-Transfer commands

Figure 8 Resume Reading Operation

image:Image illustrates the Resume Reading Operation as described in context

In this example, the reading happens in the following steps:

  1. The adapter starts reading the file then reaches a break condition after a partial data read (the end of Part 1), the adapter’s pre-transfer commands have already been executed. The resume-reading state is stored, and no post-transfer commands are executed. The adapter is waiting for the next execution of the Business Rule.

  2. The resume-reading operation is in progress but still attains only partial data reads. The adapter reads from one break condition to the next (Part 2 and Part 3 in the figure) The resume-reading state is stored in each case, and the adapter executes the Business Rule once per each part.

  3. The resume-reading operation is in progress and completes its data read during the final execution of the Business Rule (Part 4). The adapter reads from a break condition to the end of a file. No resume-reading state is stored, and any post-transfer commands are then executed.

In all of the previous steps, the Business Rule is executed repeatedly, and the current read position in the file changes on each execution. If the file is smaller than Part 1 in the figure, the adapter does not reach a break condition. The operation is normal, and no resume-reading state is stored. The pre- and post-transfer commands are executed.

Operation Without Resume Reading Enabled

If the Resume Reading feature is not enabled:

To Avoid Storing a Resume Reading State

Sometimes a partial data-stream read is necessary even when the Resume Reading feature is enabled. For example, there could be some application logic on top of the record parsers, which might abandon the rest of the file because of a corrupted record and close the file successfully after reading only part of the file’s content.

In this case, you must set the LocalFileOTD.Configuration.ResumeReading node to False before calling finish(). This setting tells the BatchLocalFile OTD to complete the operation without storing a resume-reading state. You can set up the Collaboration Rule to then send notifications or take other measures, as desired.

Data Stream-Adapter Provider

You can use the BatchLocalFile OTD to implement the adapter’s data streaming feature. This feature is also available with the FTP and record-processing OTDs. However, the BatchLocalFile OTD is a data stream-adapter provider, while the other two OTDs are only consumers. See Streaming Data Between Components for details on how to use the OTD’s data streaming feature.

Sequence Numbering

Sequence numbering for the BatchLocalFile OTD operates similar to sequence numbering for the BatchFTP OTD. See Sequence Numbering for details.

Generating Multiple Files with Sequence Numbering

When using a Java Collaboration to generate multiple files that have sequence numbering using the BatchLocalFile interface, reset() must be called to signify the end of one file and the start of the next.

Handling Type Conversions

This feature in this OTD operates in the same way as type conversion for the BatchFTP OTD. See Handling Type Conversions for details.

Recommended Practice

To parse records or construct payloads in your Collaboration, we recommend that you use the record-processing BatchRecord OTD together with the BatchLocalFile OTD. Using the two OTD together provides a number of advantages over just using the BatchFTP OTD.

Example 1: Parsing a Large File

For example, you have set up a Collaboration Rule to parse a large file and submit the records to a database or a JMS IQ Manager. If something goes wrong during the parsing process, the whole file needs to be transmitted again from the FTP server.

In contrast, streaming from a local file system can avoid later FTP transfers of the same file in case of error. This approach has the advantage of allowing you to use data streaming and the Resume Reading feature with large files (see Streaming Data Between Components and Resume Reading Feature.

Example 2: Slow, Complex Query

Another scenario could be a case where a slow, complex SQL query is used to retrieve a number of records. The Collaboration Rule packs them into a Payload node using the record-processing OTD then sends them via FTP to an external system. If the FTP transfer fails, the SQL query must be executed again.

In contrast, if the data payload has been stored locally with the BatchLocalFile OTD, the FTP transfer can be repeated without the need to re-execute the SQL query. In such cases, you can also use data streaming and local-file appending.

In both cases, the use of a data-streaming link can significantly reduce the memory requirements compared to the in-memory data-payload transfer used with the BatchFTP OTD.

OTD Limitations

The BatchLocalFile OTD supports mapped drives and NFS mounted drives. It does not, however, support the mapping of the drives. That is, the drive must already be mapped or mounted. The adapter itself does not perform any mapping or mounting.

The OTD supports Universal Reference Identifiers (URIs) but the scheme must be left off, for example,\\drive\directory\file_name.