classAnova - Knowledge Shared


Posted by: Bob Cozzi
IT Researcher
Cozzi Productions, Inc.
North Aurora, IL
RPG Open - Documentation Group
has no ratings.
Published: 08 Feb 2011
Revised: 04 Aug 2011 - 4647 days ago
Last viewed on: 24 Apr 2024 (4011 views) 

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.

RPG Open - Documentation Group Published by: Bob Cozzi on 08 Feb 2011 view comments

RPG Open

iComp - Compare Two Character String - Ignoring Case Differences

Syntax Diagram

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

Return to classanova.com home page.
Sort Ascend | Descend

COMMENTS