Table of Contents

Extract

Extract a field from a record, CSV element or SQL field.

Phase

This instruction is used by the TapeTrack Import Engine.

Syntax

Extract(field, offset, length, record);

Variable Type Description Min Length Max Length Min Value Max Value
field String The field to be set by this extraction.1128
offset Integer The zero based offset of the data to be extract, or the element index of a CSV element or SQL element. In the event that the data being processed is CSV based, a value of zero indicates that the raw CSV string should be extracted rather than an individual CSV element.110-214748364 2147483647
length Integer The length of the data to be extracted if the data is text based, or the maximum data length for CSV or SQL data.110-214748364 2147483647
record IntegerThe record within a header, if the value is non-zero and the data is text based. A record that is not a header if the value is zero and the data is text based. For CSV and SQL data this argument is ignored.110-214748364 2147483647

Example

Extract VOLUME field from offset 10, length 6 of the body of a report.

Extract(VOLUME, 10, 6, 0);

Extract VOLUME field from the 2nd element of a CSV file.

SetCSVDelimiter(",");
Extract(VOLUME, 2, 6, 0);

Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a header.

Extract(REPOSITORY, 70, 4, 3);

See Also

Import Engine Functions
Sync Engine Fields
TMSS10Sync