2.6 ALTINPUT

Valid for

Extract

Description

Use ALTINPUT for direct file extraction. With ACI files, multiple files can be in use at one time. For example, processing can continue on Monday's file after midnight, while Tuesday's file is opened for new data. To handle a multiple file situation, run more than one Extract process for the file sequence. Use the ALTINPUT RANGE option to distribute the files across the processes so that Extract never processes two files in sequence.

You can also use ALTINPUT to specify the access mode of the file open, and to move Extract to the next sequential file if an application has a file open that it is not updating.

To set up Extract for direct file extraction, specify the FILETYPE option in the GGSCI commands ADD or ALTER EXTRACT. When FILETYPE is specified, Extract uses a series of application files as the source of database changes rather than TMF audit trails or log trails. ALTINPUT sets up processing rules for the source files.

Syntax

ALTINPUT [RANGE (x OF y)]
[, SHARED | EXCLUSIVE | PROTECTED]
[, OPENTIMEOUT <minutes>]
[, OPENTIMEOUTSECS <seconds>]
[, TEMPLATE <wildcard template>]
[, USENEXTMODIFIED | NOUSENEXTMODIFIED ]
[, WAITNEXTMODIFIED | NOWAITNEXTMODIFIED]
[, FASTREADS]
[, WAITNEXTRBA <file rba>]
[, JTSOFFSET <byte_offset>]
[, TANDEMTSOFFSET <byte_offset>]
[, ONEFILE]
RANGE (x OF y)

Use RANGE to process multiple files within a sequence simultaneously. For information on specifying the RANGE option see "Specifying the ALTINPUT RANGE Option"

SHARED | EXCLUSIVE | PROTECTED

Specifies the access mode of the OPEN for the input file. Defaults to SHARED, in read-only mode.

OPENTIMEOUT minutes

Determines when it is safe to assume that there are no more updates to the input file.

  • If OPENTIMEOUT is not specified, Extract assumes there are no more updates five seconds after the last one is received.
  • OPENTIMEOUT minutes instructs Extract to wait for the specified number of minutes before assuming there are no more updates.

An application can have an open file that is not being updated, such as when a report program has opened a file in other than read-only mode.

TEMPLATE template

Specifies a file name template when FILETYPE is ENTRY or ADVANTAGE that can be a wildcard.

The following example specifies files on any volume starting with $DATA, on the MYDAT subvolume, beginning with FL and ending in exactly three more characters.

TEMPLATE $DATA*.MYDAT.FL???
WAITNEXTMODIFIED (DEFAULT ON)

By default, Extract waits until the next file in the sequence is modified before processing it. Use NOWAITNEXTMODIFIED to move to the next file regardless of when it was modified.

NOWAITNEXTMODIFIED

Disables the check for a write access opener on the current file.

USENEXTMODIFIED

Extract will use the file modification timestamp when deciding to switch to the next file in the sequence. The modification timestamp of the next file must be greater than the modification timestamp of the current file.

NOUSENEXTMODIFIED (DEFAULT ON)

Disables the use of modification timestamp when deciding to switch files.

FASTREADS
Causes Extract to perform bulk reads of the source file set, boosting read performance.
WAITNEXTRA <num_bytes> (DEFAULT 0)

Causes Extract to wait until the next file in the sequence has accumulated a specified number of bytes.

Valid values are 1 thru 2000000000.

JTSOFFSET byte_offset

Specifies the byte offset of a 64-bit Julian timestamp field within each record when specifying FILETYPE ENTRY. Various Oracle GoldenGate processes use the Julian timestamp to help determine replication lag. Use a timestamp field that reflects when the record was inserted into the database.

TANDEMTSOFFSET byte_offset

Specifies the byte offset of a 48-bit timestamp field within each record when specifying FILETYPE ENTRY. Various Oracle GoldenGate processes use the Julian timestamp to help determine replication lag. Use a timestamp field that reflects when the record was inserted into the database.

ONEFILE

Specify ONEFILE if FILETYPE ENTRY is used and the file set to process consists of a single file.

Specifying the ALTINPUT RANGE Option

ALTINPUT RANGE allows processing of multiple ACI BASE24 files within a sequence simultaneously. Since two TLF or PTLF files can be active at the same time, using ALTINPUT RANGE enables one Extract to process even Julian date files and the other Extract to process odd Julian date files. Even and odd Julian dates can be determined by computing a Julian date from the last six digits of each file name.

The "even" Extract process retrieves data from files where the remainder of the Julian date divided by 2 is zero (range 1 of 2). The "odd" Extract retrieves data from files where the remainder of the Julian date divided by 2 is 1 (range 2 of 2).

For example, an "odd" Extract instance processes files named PO990101, PO990103, PO990105 (Julian dates 2451181, 2451183, and 2451185, respectively). An "even" Extract instance processes files PO990102, PO990104, PO990106 (Julian dates 2451180, 2451182, and 2451184, respectively). This enables extraction for files PO990101 and PO990102 at the same time.

Note:

The RANGE option of ALTINPUT should not be confused with the RANGE argument of FILE and MAP or the function @RANGE that can be used within a FILTER. The application of each one is different.

Examples

AltInput UseNextModified, WaitNextRba 4096
AltInput Template $vol.subvol.XX*
AltInput Template $vol.subvol.TRAN*, UseNextModified
AltInput Template $vol.subvol.LOG*, UseNextModified, WaitNextRba 8192