IBM SC34-5764-01 Server User Manual


 
 MAX(
,
number
) 
returns the largest number from the list specified, formatted according to the current NUMERIC settings.
Here are some examples:
MAX(12,6,7,9) -> 12
MAX(17.3,19,17.03) -> 19
MAX(-7,-3,-4.3) -> -3
MAX(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,MAX(20,21)) -> 21
Implementation maximum: You can specify up to 20 numbers, and can nest calls to MAX if more
arguments are needed.
MIN (Minimum)
 MIN(
,
number
) 
returns the smallest number from the list specified, formatted according to the current NUMERIC settings.
Here are some examples:
MIN(12,6,7,9) -> 6
MIN(17.3,19,17.03) -> 17.03
MIN(-7,-3,-4.3) -> -7
MIN(21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,MIN(2,1)) -> 1
Implementation maximum: You can specify up to 20 numbers, and can nest calls to MIN if more
arguments are needed.
OVERLAY
 OVERLAY(new,target
,
n ,
length ,pad
) 
returns the string target, which, starting at the nth character, is overlaid with the string new, padded or
truncated to length length. (The overlay may extend beyond the end of the original target string.) If you
specify length, it must be a positive whole number or zero. The default value for length is the length of
new.Ifn is greater than the length of the target string, padding is added before the new string. The default
pad character is a blank, and the default value for n is 1. If you specify n, it must be a positive whole
number.
Here are some examples:
OVERLAY(' ','abcdef',3) -> 'ab def'
OVERLAY('.','abcdef',3,2) -> 'ab. ef'
OVERLAY('qq','abcd') -> 'qqcd'
OVERLAY('qq','abcd',4) -> 'abcqq'
OVERLAY('123','abc',5,6,'+') -> 'abc+123+++'
POS (Position)
 POS(needle,haystack
,start
) 
returns the position of one string, needle, in another, haystack. (See also the INDEX and LASTPOS
functions.) Returns 0 if needle is the null string or is not found or if start is greater than the length of
Functions
Chapter 14. Functions 189