The TOUPPER() built-in function returns the upper case equivalent of the value specified for parameter 1.
The TOLOWER() built-in function returns the lower case equivalent of the value specified for parameter 1.
The ISHEX() passes the first parameter to the cvthc MI instruction. That instruction "unfolds" the characters; creating 2 hexadecimal bytes for each single byte of parameter 1. For example, the string '38' is translated to 'F3F8'.
#default &Comp = 'IBM Corp.'
SELECT upper(corpname) INTO &CompName
WHERE CUSTNO = 5250;
if (toUpper(&comp) = &compName);
#msg Company: &compname
// continue normally
The file CUSTMAST is read and the CORPNAME column is stored in the &COMPNAME session variable. That column is converted to upper case using the SQL UPPER() function. Next the SQL iQuery Script IF statement is used to compare the value from the file to a known value. To make sure the comparison is performed correclty, the built-in function TOUPPER is used to compare the value to that which is returned from the table.