View previous topic :: View next topic
|
Author |
Message |
pankajsoni
New User
Joined: 21 Jun 2006 Posts: 9 Location: Zurich
|
|
|
|
Hi all,
I am trying to declare a global temporary table in one of my rexx exec. I am using DSNREXX.
However, I am getting -104.
Is it allowed to declare a global temporary table in rexx exec with DSNREXX ? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What does the -104 have to do with
Quote: |
Is it allowed to declare a global temporary table in rexx exec with DSNREXX ? |
|
|
Back to top |
|
|
pankajsoni
New User
Joined: 21 Jun 2006 Posts: 9 Location: Zurich
|
|
|
|
While executing the below SQL(in rexx exec via DSNREXX) I am getting this sqlcode:
DECLARE GLOBAL TEMPORARY TABLE CRE.TEMP1
( NAME CHAR(8) NOT NULL,
TYPE CHAR(3) NOT NULL
)
SQLERRMC points to GLOBAL.
So my question is that : is it a valid statement in rexx or not ? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Code: |
DECLARE GLOBAL TEMPORARY TABLE CRE.TEMP1
( NAME CHAR(8) NOT NULL,
TYPE CHAR(3) NOT NULL |
)
pankajsoni wrote: |
So my question is that : is it a valid statement in rexx or not ? |
I don't think so, it looks more like a DB2 statement.... |
|
Back to top |
|
|
pankajsoni
New User
Joined: 21 Jun 2006 Posts: 9 Location: Zurich
|
|
|
|
Let me rephrase it again,
Rexx does support embedded SQL statements. I am doing all other types of sql operations, like SELECT, INSERT, UPDATE, DELETE, DECLARE CURSOR etc, without any problem...
But, when I am trying to execute above query (DECLARE GLOBAL TEMPORARY TABLE) it get fail with a SQLCODE of -104.
I know this is an error because of some token mismatch. But as the syntax is correct and I am unable to find out the error. So, I have the doubt that whether DSNREXX support DECLARE GLOBAL TEMPORARY TABLE or not ??? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I have no clue if DSNREXX supports DECLARE GLOBAL TEMPORARY TABLE or not, but the fact that you are getting a DB2 error, would have me leaning towards the fact that it can....
Quote: |
-104 ILLEGAL SYMBOL "token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: token-list |
What token is listed in the error message?
If that were resolved, you might get a more positive answer to your question.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
according to REXX Language Support Version 5:
Quote: |
You can code SQL statements in a REXX procedure wherever you can use REXX commands. DB2 REXX Language Support allows all SQL statements that DB2 for OS/390 supports, except the following statements:
v BEGIN DECLARE SECTION
v DECLARE STATEMENT
v END DECLARE SECTION
v INCLUDE
v SELECT INTO
v WHENEVER |
|
|
Back to top |
|
|
|