Purpose
To define the format of the data extracted from fields in a message.
Format
/MQFIELDSEXTRACT QUEUE queue extracted_field [,extracted_field...]where
extracted_field | = | fieldnname [extract_option...] |
extract_option | = | {EXTRACTAS dataspec [ENCODING encoding]} [TREATAS ASCII] } {NULLABLE|NOTNULLABLE } {ALIAS alias } |
dataspec | = | {datatype [length]} {length datatype } |
datatype | = | {[CHARACTER] } {numeric_format } {DATETIME (datetime_pattern)} {LOB [filename] } |
Location
The option may appear anywhere in the task definition.
Arguments
queue | The message queue from which the data is extracted. |
field_name | The name of the extract field in the message queue, which can be used to reference the field from other options. |
encoding | The scheme used for encoding the field data. Only a character field can have an associated encoding. See dmexpress data types/text data type in the Connect help for a list of the valid values. |
alias |
An alternate name you assign to the extracted field, which can be used to reference the extracted field from other options. When an alias is defined, you can no longer reference the original name directly in your task. The name must adhere to the rules described for an identifier. For a summary of valid naming and formatting conventions for identifiers and constants, see syntax reference in the Connect help. |
numeric_format | The type of numeric data held in the field. The default data type is number unless the position is a bit position, in which case the default data type is bit. |
datetime_pattern |
The mask that specifies the format of an extracted date/time field. For a summary of valid naming and formatting conventions for identifiers and constants, see syntax reference in the Connect help. |
filename | Prefix for the name of the file where the LOB data is to be stored. It must be a constant string. If it is specified, LOB data values will be written to files named <filename>_<rownumber>. If it is omitted, a default name is generated, and the files are written to the workspace directory. |
Location
The option may appear anywhere in the task definition.
Notes
Use the connection in the /MQINPUT option to identify the message queue that is defined as the source of records.