OFFSET( ) function

Returns the value of field with the starting position offset by a specified number of bytes.

Syntax

OFFSET(field, number_of_bytes)

Parameters

field

A field name.

number_of_bytes

Numeric. Any positive numeric expression.

Output

The return value is the same data category as the input field parameter.

Remarks

You can use this function to temporarily offset the starting position of a field. This is useful when you are processing data where the field starting position is variable.

If you use the OFFSET( ) function with conditional computed fields, any fields referenced in the IF test will also be offset.

Examples

If you have a field called “Number” that contains the value “1234567890” and you define an overlapping field called “Offset_Number” that has a starting position of 1, a length of 3, and no decimals places, you can use the OFFSET( ) function to shift the numbers in the field.

Example Return value

OFFSET(Offset_Number,0)

123

OFFSET(Offset_Number,1)

234

OFFSET(Offset_Number,6)

789



(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback