views:

820

answers:

2

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

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

This works. However, when the member String has a . in it this confuses everthing.

Is there any way of dealing with this?

Thanks.

+4  A: 

You can escape any .'s by changing eg:

member = "foo.bar"

to

member = "\"FOO.BAR\""

ie capital letters enclosed within double quotes.

nearly_lunchtime
A: 

Somewhere in http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp>here there are details on how library(members) are handled.

Your problem seeems to be the basic member name is leant to be up eight chars and anything after a '.' is interpreted as a type (somewaht like .html, .jpg .exe etc) however you can only store one type of data in a library object. So if your first memeber was premier.stuff than all the other member must have ".stuff" as a suffix if supplied.

The official 400-eze for a member is:

member

Different sets of data, each with the same format, within one database file.

You could probably get away with deleting everything after the first period from your member name.

Sorry if this isnt too clear but when the iSeries was designed they ignored every OS designed up till that point and started again from scratch. The results take some getting used too.

James Anderson