Please enable JavaScript to view this site.

Get the position of a given field in its record

Category

Record

Syntax

OFFSET_OF(input field)

 

Parameter Descriptions

input field  -  The name of an input field of a binary-format record, this include plain Binary datastore, IMSCDC and VSAMCDC.

Example

The function return a position, the position in the source record of the original value of the field. This position is 1-based to be used with the MID() function. .A typical use

_col_val = MID(GET_RAW_RECORD(CDCIN), OFFSET_OF(CDCIN.FOO.BAR), 5)