g

g


f-correlative Index Level group extract
Syntax g{skip.segments} delimiter get.segments
Category Processing Codes
Type Processing Code
Description extracts one or more groups of contiguous character substrings delimited by the specified character.

"skip.segments" argument specifies the number of delimited groups to skip before performing the extraction.  It must be a single digit numeric, if omitted, zero is assumed, and extraction occurs from the beginning of the value.

"delimiter" may be any single printable character except numerics or the minus sign.

"get.segments" specifies the number of contiguous groups to extract from the value.
Options
See Also processing codes input-conversion Processing Codes group extract
Example The following examples illustrate the results obtained from various combinations of the "g" code if the value being processed was the string: ca*92714*1000:

g*1         ca
g0*1        ca
g*3         ca*92714*1000
g1*2        92714*1000
g2*1        1000
g2*2        1000
g3*1        (null)
Warnings The implied spaces between the arguments in the syntax definition are for visual clarity only and are not allowed.
Compatibility
f-correlative Index Level group extract