PowerCenter
- PowerCenter 10.5
- All Products
BINARY_SECTION(binary, start [,length])
Argument
| Required/
Optional
| Description
|
---|---|---|
binary
| Required
| You can enter a binary value or any transformation expression that returns a binary datatype.
|
start
| Required
| You can enter an integer or any transformation expression that returns an integer.
The position in the binary where you want to start counting. If the start position is a positive number,
BINARY_SECTION locates the start position by counting from the beginning of the input binary.
If the start position is a negative number,
BINARY_SECTION locates the start position by counting from the end of the input binary.
If the start position is 0,
BINARY_SECTION searches from the first byte in the input binary.
|
length
| Optional
| You can enter an integer greater than 0 or any transformation expression that returns a positive integer.
The number of bytes you want
BINARY_SECTION to return. If you omit the length argument,
BINARY_SECTION returns all of the bytes from the start position to the end of the input binary. If you pass a negative integer or 0, the function returns an error.
|
BINARY_SECTION( SYSID, 0, 3 )
|
|
---|---|
|
|
|
|
|
|
BINARY_SECTION( SYSID, 4, 5 )
|
|
---|---|
|
|
|
|
|
|
BINARY_SECTION( SYSID, -6, 5 )
|
|
---|---|
|
|
|
|
|
|
where SYSID is the binary equivalent of 0x000102030405.BINARY_SECTION( SYSID, 2, 8 )
where SYSID is the binary equivalent of 0x000102030405.BINARY_SECTION ( SYSID, -2, 8)