Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
bool = iComp( compValue1 : compValue2 );
The iComp subprocedure returns *ON or *OFF depending on the results of the comparison. The two input values are compared, ignoring upper/lower case differences. If the two values are identical (ignoring case differences) *ON is returned. If differences are detected, *OFF is returned.
/free if iComp(searchValue : compname); // values compare okay. endif; /end-free
In this example, the search field named SEARCHVALUE is compared with the data in the COMPNAME field. Upper/Lower case differences are ignored and the IF conditional statement is performed based on the results of the iComp() comparison.
Return to RPGOpen.com