SV: Create Global Temp Table question

Sven Heidorn

SV: Create Global Temp Table question
Amy,

you only need to create the GTT once when using created GTT's, like any
other table the definition is stored in the catalog. The physical table is
created when you refer to it in your Cobol program (INSERT INTO) and deleted
when you commit. You get the -601 because the table definition is already in
the catalog.

Sven Heidorn

> -----Ursprungligt meddelande-----
> Från: Amy C Whitehead [SMTP:[login to unmask email]
> Skickat: den 3 januari 2001 15:43
> Till: [login to unmask email]
> Ämne: Create Global Temp Table question
>
> Hi,
> Due to being on v5 in production, we have to use the non-indexable 'create
> global temp table' syntax for GTTs. Eventhough this execution is
> successfull, we always get a -601. A -601 says that the table already
> exists. How do we prevent this error message?
> Here is the syntax that is embedded in the cobol program:
> EXEC SQL
> CREATE GLOBAL TEMPORARY TABLE SESSION.TEMPTAB
> (cola CHAR(20) NOT NULL)
> END-EXEC.
>
> Thanks,
> Amy Whitehead
>
>
> visit
>
>