XRANGE (Hexadecimal Range)

The XRANGE function returns a string of all valid 1-byte encodings (in ascending order) between and including the values start and end.

Read syntax diagramSkip visual syntax diagram XRANGE( start ,end )

The default value for start is '00'x, and the default value for end is 'FF'x. If start is greater than end, the values wrap from 'FF'x to '00'x. If specified, start and end must be single characters.

Examples

XRANGE('a','f')      ->   'abcdef'
XRANGE('03'x,'07'x)  ->   '0304050607'x
XRANGE(,'04'x)       ->   '0001020304'x
XRANGE('i','j')      ->   '898A8B8C8D8E8F9091'x  /* EBCDIC */
XRANGE('FE'x,'02'x)  ->   'FEFF000102'x