Terms

Pipelines v2.1

 

Where appropriate, a syntax diagram is used to explain the structure of a term, its operands and default values.

Home

 

char

 
>>──┬─SPACE─┬────────────────────────────────────────────────────────────────────────>>
    ├─char──┤
    ├─Xchar─┤
    ├─Hchar─┤
    └─Bchar─┘
 

char

is a single character. You may specify; char, Xchar, Bchar, or the keyword SPACE. The SPACE keyword is a synonym for the space character; the hexadecimal value X'20'.

 

Xchar

Hchar

specifies two characters following the X or H; that defines a hexadecimal value. The X or H can be specified in uppercase or lowercase. You must not specify any spaces in the string. There must be two hexadecimal characters in the string. For example:

 

x31

 

Bchar

specifies a string of 0's and 1's, following the B; that defines a binary value. The B can be specified in uppercase or lowercase. You must not specify any spaces in the string. The number of binary digits must be 8. For example:

 

b00110001

 

Note. that a B, b, H, h, X or x character prefix only denotes the start of a binary or hexadecimal value if the byte which immediately follows is a valid binary or hexadecimal character. Otherwise the character represents its ASCII character value.

 

Related API functions
ParseForCharacter();

 

charrange

 

char.n

is a range of n characters beginning with char.

 

char1–char2

is a range of characters beginning with char1 and ending with char2.

When you specify a range of target characters, the order of the characters in the range is based on the hexadecimal representation of the characters. The characters are arranged in increasing numeric order. For example, a range of 5 characters that begins with A is in the range A, B, C, D and E. This corresponds to the hexadecimal representation: X'41', X'42', X43', x'44' and X'45'.

 

If the numeric value of the hexadecimal representation of the ending character is less than the starting character, the hexadecimal representation of the character that follows X'FF', is X'01'

 

API functions
ParseForCharacterRange();

 

column, word or field number range

 
>>──┬─location──────────────┬────────────────────────────────────────────────────────>>
    ├─-location─────────────┤
    ├─location1-location2───┤
    ├─location1;location2───┤
    ├─-location1;location2──┤
    ├─location1;-location2──┤
    ├─-location1;-location2─┤
    ├─location1-*───────────┤
    ├─location;*────────────┤
    ├─-location;*───────────┤
    ├─*-*───────────────────┤
    ├─*;*───────────────────┤
    └─location.n────────────┘
 

Defines a specified location in the input data as a range of column, word, or field numbers on which the stage operates. A negative number in the range indicates that the range is relative to the end of the record. If the range is an unsigned range, then the location is always relative to the beginning of the record and references relative to the end of the record are not allowed, otherwise, the location is relative to the beginning or the end of the record. You can specify a location as follows:

 

location

-location

is a single column, word or field number. –location is relative to the end of the record. The last location in the record is -1.

 

location1–location2

location1;location2

–location1;location2

location1;–location2

–location1;–location2

is a range of columns, words, or fields beginning with location1 and ending with location2, inclusive. If you specify both locations relative to the beginning of the record, (that is, you use location1 and location2), location2 must be numerically equal to or greater than location1. If you specify both locations relative to the end of the record, (that is, you use -location1 and –location2), location2 must be numerically less than or equal to location1. If you specify location1;–location2 or if you specify .–location1;location2, the position in the record defined by location1 must occur before the position in the record defined by location2. For example, no positions in the record to locate the target string are searched if you specify –8;6 for a record that contains 15 columns, since location1 is positioned after location2 in the record.

 

For example, the input character string in the following pipeline consists of 4 words that are separated by a space, The operands WORDS 2–4 specify the second, third and fourth words in the string as the input data for the SPECS stage:

 

   **** Top of file ****
 1 Address Rxpipe
 2
 3 'pipe literal /abc def ghi jkl/',
 4      '| specs words 2-4 1',
 5      '| console'
 6
 7 Exit 0
   **** End of file ****
 
output:
def ghi jkl
 

location1-*

location1;*

-location1;*

is a range of columns, words, or fields, beginning with location1 and ending with the last column, word, or field of the record, inclusive. In the following example, the pipeline specifies the last eight columns as the input location for the XLATE stage:

 

   **** Top of file ****
 1 Address Rxpipe
 2
 3 'pipe literal /abcdefghijklmn/',
 4      '| xlate -8;*',
 5      '| console'
 6
 7 Exit 0
   **** End of file ****
 
output:
abcdefGHIJKLMN

 

*-*

*;*

is a range of columns, words, or fields beginning with the first column, word, or field of the record and ending with the last column, word, or field of the record, inclusive.

 

location.n

is a range of n columns, words, or fields beginning with location. You can specify any number from 1 to _MAX_INT_ for n.

 

Related API functions
ParseForIntegerRange()
ExtractColumnRange()
ExtractWordRange()
ExtractFieldRange();

 

Double

 

By default a floating-point double-precision number may contain a value in the range: _MIN_DOUBLE_ to _MAX_DOUBLE_. However, a stage may specify that it requires a value that is limited to another lower minimum value and/or upper maximum value.

 

The following definitions are considered to be identical floating-point double-precision values:

 

78000.0

+7.8e4

7.8e+4

78e3

 

Related API functions
ParseForDoubleString();
ConvertToDouble();

 

inputrange

 
    ┌─1-*──────────────┐
>>──┼──────────────────┼─────────────────────────────────────────────────────────────>>
    └─separator──range─┘
 

1-*

the whole record is operated on by the stage.

 

separator

defines a character or characters that delimit words or fields.

 

range

defines a number of words or fields, or a number of column positions.

 

integer

 

By default an integer may contain a value in the range: _MIN_INT_ to _MAX_INT_. However, a stage may specify that it requires an integer value that is limited to another lower minimum value and/or upper maximum value.

 

Related API functions
ParseForIntegerString();
ConvertToInteger();

 

_MIN_DOUBLE_ and _MAX_DOUBLE_

 

The minimum and maximum values for a floating-point double-precision number are:

 

double
 
_MIN_DOUBLE_ = -_MAX_DOUBLE_
_MAX_DOUBLE_ = 9223372036854775800

 

_MIN_INT_ and _MAX_INT_

 

The minimum and maximum values for an integer and unsigned integer number are:

 

integer

 

_MIN_INT_ = -_MAX_INT_

_MAX_INT_ = 2147483647

 

unsigned integer

 

_MIN_INT_ = 0

_MAX_INT_ = 2147483647

 

Range

 
               (1)
>>──┬─Words─────────wordrange──┬─────────────────────────────────────────────────────>>
              (1)             
    ├─Fields────────fieldrange─┤
    └─columnrange──────────────┘
 
Notes:
(1) Spaces are optional in this position.
 

Words

specifies, in terms of delimited character strings (Words), the input data on which the stage operates. The WORDSEPARATOR operand defines the character or characters that delimit words.

 

A word cannot be null. If a record begins with one or more delimiters, the first word in that record begins in the position immediately following the delimiter or delimiters. Two or more consecutive delimiters are equivalent to having one delimiter which means that the next word begins in the first position after the delimiters.

 

Fields

specifies, in terms of delimited Fields, the input data on which the stage operates. The FIELDSEPARATOR operand defines the character or characters that delimit fields.

 

A field can be null. A record that begins with the delimiter has a null field as the first field. Two consecutive delimiters is considered a null field.

 

wordrange

defines a specified location of the input data as a range of word numbers on which the stage operates.

 

fieldrange

defines a specified location of the input data as a range of field numbers on which the stage operates.

 

columnrange

defines a specified location of the input data as a range of column numbers on which the stage operates.

 

separator

 
>>──┬─WORDSEParator──┬──┬─string─┬───────────────────────────────────────────────────>>
    ├─WS─────────────┤  └─SPACE──┘
    ├─FIELDSEParator─┤
    └─FS─────────────┘
 

WORDSEParator

WS

specifies a character or characters that separate words in an input record. For example, in the LOCATE of the following pipeline, we use WORSEPARATOR to specify that the dash (-) separates each word:

 

   **** Top of file ****

 1 Address Rxpipe

 2

 3 'pipe literal /a-b-c/',

 4      '| literal /d-e-f/',

 5      '| locate wordsep /-/ w3 /c/',

 6      '| console'

 7

 8 Exit 0
   **** End of file ****

 

output:

a-b-c

 

A word separator definition remains in effect until the next WORDSEPARATOR specification is encountered. A space is used as the default word separator if you do not specify the WORDSEPARATOR keyword.

 

FIELDSEParator

FS

specifies a character or characters the separate fields in an input record. For example, in the JOIN stage of the following pipeline, we use FIELDSEPARATOR to specify that the question mark (?) separates each field:

 

   **** Top of file ****
 1 Address Rxpipe
 2
 3 'pipe literal /a?b/',
 4      '| literal /e??f/',
 5      '| locate fieldsep /?/ f2-3 /f/',
 6      '| console'
 7
 8 Exit 0
   **** End of file ****
 
output:
e??f
 

A field separator definition remains in effect until the next FIELDSEPARATOR specification is encountered. A space is used as the default field separator if you do not specify the FIELDSEPARATOR keyword.

 

 

string

specifies a string of characters that delimit a word or field. Any of the characters in the string are considered to be a separator. For example, in the following pipeline, the SPECS stage extracts the name of the file. Using a WORDSEPARATOR specification of '\.', the name of the file is the second-to-last word of the record.

 

   **** Top of file ****
 1 Address Rxpipe
 2
 3 'pipe lit /C:\myfiles\myfile.txt/',
 4      '| specs ws '\.' w-2 1',
 5      '| cons'
 6
 7 Exit 0
   **** End of file ****
 
output:

myfile

 

SPACE

specifies that a space is used as the WORDSEPARATOR or FIELDSEPARATOR.

 

string

 
>>──┬─delimited string─┬─────────────────────────────────────────────────────────────>>
    ├─Xstring──────────┤
    ├─Hstring──────────┤
    └─Bstring──────────┘
 

delimited string

A delimited string starts and ends with the same character. The character must be any nonblank character that does not appear in the string. For example:

 

/a string/

 

You cannot use a B, b, X, x, H or h for a delimiting character.

 

Xstring

Hstring

A hexadecimal string starts with an X or H and consists of pairs of hexadecimal characters. The X or H can be specified in uppercase or lowercase. There must be an even number of hexadecimal characters in the string and there must be no spaces. For example:

 

x6120737472696e67

 

Bstring

A binary string starts with a B and consists of 0's and 1's. The B can be specified in uppercase or lowercase. The number of binary digits must be divisible by eight and there must be no spaces. For example:

 

b0110000100100000011100110111010001110010011010010110111001100111

 

Note. When a stage specifies that the string is to be used as a PATTERN of characters, the * and ? characters, and their hexadecimal and binary representations have special meaning. They are interpreted as wild cards.

 

The * character represents any group of (optional) characters.

The ? character represents any single (required) character.

 

Related API functions
ParseForCharacterString();
ParseForRegExp();
RegExpMatch();
PatternMatch();

 

unsigned integer

 

By default an unsigned integer may contain a value in the range: _MIN_INT_ to _MAX_INT_. However, a stage may specify that it requires an unsigned integer value that is limited to another lower minimum value and/or upper maximum value.

 

Related API functions
ParseForIntegerString();
ConvertToInteger();