Page 1 of 1

DB2 Truncate

PostPosted: Wed Oct 17, 2012 6:17 pm
by vkumarg3
Hi all,

My problem is, could not use TRUNCATE command in DB2-COBOL program.

EXEC SQL
TRUNCATE TABLE SELL_DB_UPLD
       REUSE STORAGE
       IGNORE DELETE TRIGGERS
       IMMEDIATE
END-EXEC.


This was my code it shows two errors when compling.

First Error : "IS" required
Second Error: Illegal symbol SELL_DB_UPLD, some symbol that is legal are "IS".

We are using DB2 version 8. Whether TRUNCATE command work above DB2 9.7 version or it will run in all version?

Please help.

Thanks in advance.

Re: DB2 Truncate

PostPosted: Wed Oct 17, 2012 6:46 pm
by BillyBoyo
Have a look at the manual for your version of DB2. They are all available on the web.

Re: DB2 Truncate

PostPosted: Wed Oct 17, 2012 7:09 pm
by GuyC
or google DB2 z/OS truncate wuld get you this link (2nd hit on my google):
http://db2portal.blogspot.be/2007/04/me ... r-zos.html