Case Insensitive Searches Using OPNQRYF

LANSA

Case Insensitive Searches Using OPNQRYF
Example 183 - Rating: common
The Things that Make Up this ExampleTo Execute this Example

You can do searches that ignore uppercase and lowercase by building a query select string and using LANSA’s OPEN *OPNQRYF command:





Notes and suggestions:

The XLATE function selects all records containing the value of field #ADDRESS. In this example it doesn’t matter if the string in ADDRESS1 field from the PSLMST file contains lowercase or uppercase characters. This is achieved using the translation table parameter (QSYSTRNTBL). Just before the final selection of each record, it translates the value of field ADDRESS1 into uppercase characters and then compares the value with request field #ADRRESS.



Keywords
CASEOPNQRYF
SearchExample 183