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

BatchRecord OTD

BatchRecord, the Batch Adapter’s record-processing OTD, allows you to parse (extract) records from an incoming payload (payload data) or to create an outgoing payload consisting of records. Understanding the operation of this OTD and how to use it requires an explanation of some of these terms.

The word payload here refers to an in-memory buffer, that is, a sequence of bytes or a stream. Also, records in this context are not records in the database sense. Instead, a record simply means a sequence of bytes with a known and simple structure, for example, fixed-length or delimited records.

For example, each of the following record types can be parsed or created by this OTD:

The record-processing OTD can handle records in the following formats:

When using character delimiters with DBCS data, use single byte character(s) or equivalent hex values with hex values that do not coincide with either byte of the double byte character.

BatchRecord OTD Structure

The BatchRecord OTD contains two top-level nodes, Client, Configuration, PersistentState, and StateManager. Expand these nodes to reveal additional sub-nodes.

Figure 9 BatchRecord OTD Structure

image:Image displays the BatchRecord OTD Structure

OTD Structure and Operation

Each field node under the Configuration node of the OTD, corresponds to one of the adapter’s record-processing configuration parameters.

Record-processing OTD Node Functions

The following list explains these primary nodes in the record-processing OTD, including their functions:

Using the Record-processing OTD

This OTD has the following basic uses:

A single instance of the OTD is not designed to be used for both purposes at the same time in the same Collaboration. To enforce this restriction, there is a setting under the adapter’s General Settings parameters called Parse or Create Mode, for which you can select either Parse or Create.

Using get() and put()

The get() and put() methods are the heart of the OTD’s functionality. If you call either method, the record retrieved or added is assumed to be of the type specified in the adapter configuration, for example, fixed-length or delimited.

The get() method can throw an exception, but generally this action only happens when there is a severe failure. One such failure is an attempt to call get() before the payload data (or stream if you are streaming) has been set. However, the best practice is to code the Collaboration to check the return value from a get() call. A return of true means a successful get operation; a false means the opposite.

Choosing the Parse or Create Mode

The adapter checks to ensure that the proper calls are made according to your mode setting. For example, calling put() in a parse-mode environment would cause the adapter to throw an exception with an appropriate error message explaining why. Calling get() in the create mode would also result in an error.

The adapter requires these restrictions because:

As a result, you can place the OTD on the source or destination side of a given Collaboration, as desired, and use the OTD for either parsing or creating a payload. However, you cannot parse and create at the same time. Implement your OTD in a Collaboration using the Java CAPS Collaboration Rules Editor.

Creating a Payload

When you want the payload data sent to an external system, you can place the OTD on the outbound side of the Collaboration interfacing with that system. Successive calls to put() build up the payload data in the format defined in the adapter configuration.

Once all the records have been added to the payload, you can drag and drop the payload onto the node or nodes that represent the Collaboration’s outbound destination. Also, you can set an output stream as the payload’s destination.

When you are building a data payload, you must take into account the type and format of the data you are sending. The adapter allows you to use the following formats:

Parsing a Payload

To represent payload data inbound from an external system, you map the data to the payload node in the OTD (from the Collaboration Rules Editor). In addition, you can specify an input stream as a source.

Either way, each successive call to get() extracts the next record from the payload. The type of record extracted depends on the parameters you set in the adapter’s configuration, for example, fixed size or delimited.

You must design the parsing Collaboration with instructions on what to do with each record extracted. Normally, the record can be sent to another Collaboration where a custom OTD describes the record format and carries on further processing.

Fully Consuming a Payload

It is possible to fully consume a payload. That is, after a number of successive calls to get(), you can retrieve all the records in the payload. After this point, successive calls to get() return the Boolean false. You must design the business rules in the subject Collaboration to take this possibility into account.

Using Record Processing with Data Streaming

If you are using the record-processing OTD with data streaming, you must be careful not to overwrite the output files. If the OTD is continually streaming to a BatchLocalFile OTD that uses the same output file name, the OTD can write over files on the output side.

To avoid this problem, you must use either file sequence numbering or change the output file names in the Collaboration Rules. Sequence numbering allows the BatchLocalFile OTD to distinguish individual files by adding a sequence number to them. If you use target file names, post-transfer file names, or both, you can change the name of the output file to a different file name.

For more information on how to use these features, see Sequence Numbering and Pre/Post File Transfer Commands.