Archives of the TeradataForum
Message Posted: Thu, 13 Feb 2004 @ 04:08:33 GMT
Subj: | | Re: Volatile table existence check |
|
From: | | Jim Downey |
This script releases a lock on a table and if it gets an error code=3807, it creates the table... otherwise it skips the ddl. The errorlevel
statement forces bteq to return a code=0 for this specific error. I use this script for perm tables but it should work for volatile tables.
/***********************************************************************
*** DDL SCRIPT: DWNO0181
*** CREATE INCR TABLE
***
**********************************************************************/
.LABEL DWNO018100
.SET ERRORLEVEL 3807 SEVERITY 0
RELEASE LOCK WORKDB_NDW.NOSS_NICOMML_INCR
, OVERRIDE
;
.IF ERRORCODE<>3807 THEN .GOTO DWNO018199
CREATE ....your code here.....
.LABEL DWNO018199
|