|
Of course, Upper and lower case do not compare EQUAL so it will fail the IF test. You need to convert to upper case, using a CCSID-safe conversion method. There are two of these: The RPG xTools ToUpper() procedure will do a CCSID-save conversion so you could do this in your code: If ToUpper(TheMixedField) = TheUPPERFIELD The other option is to set up and call the QlgConvertCase API yourself. -Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Eric A. Wolf Sent: Thursday, August 05, 2004 12:33 PM To: RPG programming on the AS400 / iSeries Subject: Comparing Uppercase vs. Upper/lower case fields To the list, I am trying to compare two fields one is in Upper Case and the other is in Upper and Lower case. The file is coded with SRTSEQ(*LANGIDSHR) and the program is compiled with this parameter as well. There are the same number of characters and field sizes but the fields fall thru the IF statement as if they are not equal. The CCSID is set to 37 (do not know how this was set). Do I need to convert one the Upper/Lower case field to all Upper to get a valid compare -or- am I missing a parameter? TIA... Eric -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.