Is there anyway of 'turning off' case sensitivity on the SCAN Op Code? Yours Hopefully Ken
Is there anyway of 'turning off' case sensitivity on the SCAN Op Code? Yours Hopefully Ken
Ken, The typical way to handle something like that would be to just capitalize each string and then run the scan. Here is some RPG/400 code to capitalize a field:I 'ABCDEFGHIJKLMNOPQRS- C UP I 'TUVWXYZ' I 'abcdefghijklmnopqrs- C LO I 'tuvwxyz' I* C LO:UP XLATEFIELD FIELDBill
Ken - If you want to retain the case in the original field, you would translate it into a new field, scan against the new field, and use the resulting position against the original field. Bill
Ken, If the program does updates to that field/file, be sure to xlate a workfield after moving the file/field data to it. -bret
Instead of the SCAN opcode, you can use the QCLSCAN API which, depending on the parameters you pass, will convert the string to upper case. See: http://publib.boulder.ibm.com/cgi-bi.../QB3AMV03/1.26?