STRNCMP: Comparing Character Substrings

How to:

The STRNCMP function compares a specified number of characters in two character strings starting at the beginning of the strings using the EBCDIC or ASCII collating sequence.

Syntax: How to Compare Character Substrings

STRNCMP(string1, string2, number)

where:

string1, string2

Alphanumeric

Are the strings that contain the substrings to compare.

number

Integer

Is the number of characters to compare in string1 and string2.