Is the temporary table still in use, i.e. was it read with a cursor and the
cursor is not yet closed?
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Gary
Thompson
Gesendet: Thursday, 18.6 2015 20:15
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: SQL0601 issued when WITH REPLACE was specified ?
V7R1M0
I'm testing a change to an SQLRPGLE which has been in use for some years.
The program object was created using PDM work with Objects to copy the
program from a production lib into a special test lib I'm using just for
this test.
I'm wondering why I received SQL0601 on the following embedded SQL:
DECLARE GLOBAL TEMPORARY TABLE  lcp980wk1
      ( delloc        CHAR(4)     NOT NULL,
        deldat     NUMERIC(7,0)   NOT NULL,
        delrte        CHAR(5)     NOT NULL,
        pocnumint  NUMERIC(5,0)   NOT NULL,
        outnum     NUMERIC(13,0)  NOT NULL,
        pocsfxvp      CHAR(5)     NOT NULL,
        vehnum        CHAR(5)     NOT NULL,
        vehdcr        CHAR(30)    NOT NULL,
        door          CHAR(5)     NOT NULL
      )
WITH REPLACE NOT LOGGED
My assumption was "WITH REPLACE" would allow the table to be replace in the
event it exists ?
Would it be better practice to start with a DROP command ?
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.