Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us