×
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.
Does anyone know the specifics of how the SQL pre-compiler handles text literals?
I'm particularly interested in how it handles different CCSID's.
Specifically, if I write & compile a program using CCSID 37 with a hard coded literal (say a regular expression), will the literal work when the program is run in a different CCSID that isn't aligned with 37?
I wrote & compiled the following code in CCSID 37 ... and it works fine in that CCSID.
exec sql
set :var2 = REGEXP_SUBSTR(:var1, '\s+ab(cd)?efg\s*', 1, 1,'i',1);
I then ran it in CCSID 5026 and it also worked ... which I didn't expect (because lower case characters in 5026 don't align with 37).
On a side note ... where are literals stored when the pre-compiler generates source? For instance, in the above statement, where would the regular expression be stored? The only place I can see it is as a comment in the generated source.
Thanks!
david
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.