|
Phil, Are you creating thousands of tables? If not I would just use execute immediate and pass the full statement that would be built using RPGIV's swell string support. As I recall, you do have to pass a fixed length string (no varying) to execute immediate. It may not be a hard requirement, but I am certain there is a bug related to VARYING fields and RPGLE SQL. David Morris >>> sublime78ska@yahoo.com 02/01/02 09:25AM >>> I am trying to do prepare a CREATE TABLE statement (code is below) using parameter markers for the table name and the record length. I get a runtime error that the token ? is invalid. Have I done something wrong here or is it not permissible to use parameter markers for these values? Thanks, Phil P SQLCrtTable b D SQLCrtTable pi D file 10 value D length 3 0 value D len s 3 D SQLStmt s 256 D prepared s n static C if prepared = *off C eval len = %editc(length:'X') C eval SQLStmt = C 'create table qtemp/? + C (record character ( ? ) + C not null with + C default)' C/exec sql C+ prepare crtTblStmt from :SQLStmt C/end-exec C eval prepared = *on C endif C/exec sql C+ execute crtTblStmt C+ using :file, :len C/end-exec C return P SQLCrtTable e
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.