× 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.



This is a gigantic issue.  It was ten or fifteen years ago when we addressed
this in BPCS; basically we removed all "variant" characters (characters that
were technically legal in RPG field names but had different hex values in
different languages).  The variant characters are # (crosshatch), $ (dollar
sign) and, believe it or not, the @ (at sign).

Okay, crosshatch is x'7B' in CP037.  In French CP297, x'7B' is the "pound
sterling" sign (which I can't show in plain text email, but it's the curly
L).  In CP037, x'B1' is pound sterling and in CP297 it's the crosshatch.  My
guess is that your source code has TRJOB+x'7B', while your database has been
encoded with TRJOB+x'B1'.  What you want is for JDBC to convert every x'7B'
in your source code to x'B1', and I don't think it's going to do that.  For
starters, you'd have to specify two CCSIDs: the one your source is in, and
the one the database is in.  Second, would you want it to translate the
actual data in the statements, or only field/file names?

Instead, your best bet MIGHT be to try and replace the crosshatches in your
code with the pound sterling sign.  The other option is to actually enter
the source code as CP297.  In either case, the last character of the field
name should be stored as X'B1'.  The downside of course is that the code
won't work on your English machines.

I'll be interested to see the outcome of this.  If there is a setting that
makes JDBC smart enough to handle this, it will be a very important setting
to know!

Joe

P.S. You should never use these symbols in field or variable names if your
code is intended to run internationally.  If they don't teach this in DBA
101, they should.  I know it's not your database, but in order to remove a
lot of headache for the rest of the package's life, you may really want to
consider internationalizing your database and removing variant characters.

From: David Gibbs

Mark Phippard wrote:
>>I've got a JDBC statement that is getting the following error ...
>>java.sql.SQLException: [SQL0113] Le nom TRJOB# n'est pas admis.
>>Which translates into: Name TRJOB# not allowed.
> To solve the problem I created a table that was keyed by an integer and 
> had a 1-char field with CCSID 65535.  I then added rows for a bunch of 
> special characters.  I then made a small Java class that will query this 
> file and return the character. 

Unfortunately, changing the table is not really an option for me.

Since the column is clearly valid in the database, I need to figure out
a way to make JDBC use a ccsid that will handle the table correctly.

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.