Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DSNREXX: -104 in "DECLARE GLOBAL TEMPORARY TABLE "

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DSNREXX: -104 in "DECLARE GLOBAL TEMPORARY TABLE "
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: 3158
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:08 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:26 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:47 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Fri Aug 03, 2007 8:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us