AS400 library / file (contributor) JDBC request

Using JDBC (with jt400 / connection driver, naming = system) I am running these SQL statements:

"CREATE ALIAS QTEMP/SOURCETEMP FOR " + library + "/" + file + " (" + member + ")"
"SELECT SRCDTA FROM QTEMP/SOURCETEMP"
"DROP ALIAS QTEMP/SOURCETEMP"

      

It works. However, when the String element has a. in this it all confuses.

Is there a way to handle this?

Thank.

+1


source to share


2 answers


You can avoid anyone. by changing, for example:

member = "foo.bar"

      

to



member = "\"FOO.BAR\""

      

those. capital letters enclosed in double quotes.

+4


source


Somewhere in here is information about how libraries (contributors) are handled.

Your problem is because the member's basename is overlaid with eight characters and something after "." interpreted as a type (someaht like.html, .jpg.exe, etc.) however you can only store one data type in a library object. So what if your first member was a prime minister. All members than all other members must have ".stuff" as a suffix, if specified.

Official 400-eze for the participant:

member



Different datasets, each with the same format, in the same database file.

You can probably manage to remove everything after the first period from your member name.

Sorry if this is not very clear, but when the iSeries was designed, they ignored every OS developed up to this point and started from scratch. The results are also starting to be used.

0


source







All Articles