View previous topic :: View next topic
|
Author |
Message |
satheeshkamal
New User
Joined: 09 Jan 2007 Posts: 28 Location: Chennai
|
|
|
|
Hi guys,
I am current facing problems in executing an SQL using DRL1SQLX.
Here is my code:
Code: |
DB2SUBS = "DSND"
Drop Owner1.
Owner1. = ' '
SQLSTMT = "SELECT DISTINCT(OWNER) ",
"FROM SYSIBM.SYSTABSTATS ",
"WHERE OWNER LIKE 'DATAB%' ",
"FETCH FIRST 10 ROWS ONLY "
SQLSTMT = Space(SQLSTMT,1)
say "SQLSTMT" SQLSTMT
SQLSTEM = "Owner1"
SQLMAX = 10
Call DRL1SQLX "INIT"
Call DRL1SQLX SQLSTMT
Call DRL1SQLX "TERM"
|
The error that displays from SQLMSG stem variable is
Code: |
DRL1005E The REXX variable Owner1.NAME.0 could not be
set.
|
SQL code returned after DRL1SQLX statement is 0 and the variable "Result" is set by DRL1SQLX to 16.
The above SQL query is working fine when executing normally using Fileaid/DB2.
I have executed a query on a different table in the same REXX code. That is perfectly working fine. I am wondering why this particular query is not working fine. Could anybody help out please? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
try:
Code: |
Drop Owner1.
Owner1. = ' '
Owner1.0 = 0 <<<<<<<<<add this line
|
|
|
Back to top |
|
|
satheeshkamal
New User
Joined: 09 Jan 2007 Posts: 28 Location: Chennai
|
|
|
|
Hi Dick,
Tried your suggestion...But, encountered the same error... |
|
Back to top |
|
|
|