IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DSNREXX: -104 in "DECLARE GLOBAL TEMPORARY TABLE "


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pankajsoni

New User


Joined: 21 Jun 2006
Posts: 9
Location: Zurich

PostPosted: Tue Jul 17, 2007 3:51 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:08 pm
Reply with quote

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
View user's profile Send private message
pankajsoni

New User


Joined: 21 Jun 2006
Posts: 9
Location: Zurich

PostPosted: Tue Jul 17, 2007 4:20 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:26 pm
Reply with quote

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
View user's profile Send private message
pankajsoni

New User


Joined: 21 Jun 2006
Posts: 9
Location: Zurich

PostPosted: Tue Jul 17, 2007 4:34 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:47 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 03, 2007 8:56 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top