× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



After some additional thought I'm going to add a few item to my original note...

*LANGIDSHR may not solve your entire problem. For conventional names it should be OK, but as this is really a shared weight solution rather than a monocasing solution it is possible for multiple characters to convert to the same weight. If this were to occur you may get the wrong record on the chain operation, though a compare of the original field to the retrieved field would indicate this situation.

Having duplicate fields in the file where you monocase using an API such as QlgConvertCase would solve this exposure.

And moving to Unicode would simplify the monocasing in addition to positioning you to easy globalization in the future.

Bruce
Bruce Vining Services, LLC

Bruce Vining <bvining@xxxxxxxxxxxxxxx> wrote:
QSYSTRNTBL is just about the worst table you could choose (well, an ASCII table wouldn't be too hot either lol). If you look at QSYSTRNTBL you will see that it only handles uppercasing a-z to A-Z. It ignores perfectly valid characters such as â.

Q037 is a bit better in that it does uppercase the extended latin characters (â to  for instance), but as it is only based on CCSID 37 you would need different tables specified for each CCSID used across your various files. This would be true for other Latin based CCSIDs in addition to non-Latin based CCSIDs where you want &#960; mapped to &#1055;.

Much better is using SRTSEQ *LANGIDSHR. This will cause database to treat the key field as shared weight and 'SMITH' will successfully chain to 'Smith' while still returning 'Smith' as user data. You do though need to make sure you have the correct LANGID value when creating the file.

And best would be to get away from EBCDIC and move to Unicode as you are clearly supporting a variety of languages.

Hope this helps,
Bruce Vining
Bruce Vining Services, LLC


David Gibbs wrote:
Folks:

I've got a PDQ (Potentially Dumb Question, a TLA I just made up) about
database key access.

We have a need to create key in a file that contains upper & lower case
data ... but when we chain to the file, we want the key to be case
insensitive. Also, this chain needs to be done in multiple CCSID's
(including DBCS).

Originally we were thinking of creating a logical file with a renamed
field & TRNTBL(QSYSTRNTBL) attribute, and making that field the key.
But it occurred to us that the QSYSTRNTBL may not be CCSID aware and, in
order to access all the fields in the file, we have to add each
individual field to the logical.

I was also thinking about giving the key field in the logical file an
alternate collating sequence table, where the table has the hex values
for the upper case letters in the lower case character positions ... but
that would not be CCSID aware.

Our only other idea is to put a duplicate field in the file ... one
field would contain the data in all caps, and would be the key, the
other field would contain the mixed case value for display purposes.
Currently this our best alternative ... and isn't that hard to
implement, because all access to this file is done through a service
program.

Any suggestions on a better way to approach this?

Thanks!

david



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.