Dynamic Bteq Script Example
clclbteq << eof > /odi47831/Scripts/Del_App_Work_Tables.txt.log
.SET ECHOREQ ON
.SET RETRY ON
.SET TIMEMSG DEFAULT
.SET ERRORLEVEL 3807 SEVERITY 0;
.run file logon.txt
.set width 200
.set titledashes off
.set format off
.set rtitle ''
.export report file=del_app_work.run
SEL 'DEL FROM ' ||Trim(Databasename)||'.'||Trim(Tablename)||';' (Title '')
FROM DBC.TABLES
WHERE CREATORNAME='xyz'
AND TABLEKIND='T'
;
.Export report file=del_app_work.sql
.run file = del_app_work.run
.logoff
.quit
.SET ECHOREQ ON
.SET RETRY ON
.SET TIMEMSG DEFAULT
.SET ERRORLEVEL 3807 SEVERITY 0;
.run file logon.txt
.set width 200
.set titledashes off
.set format off
.set rtitle ''
.export report file=del_app_work.run
SEL 'DEL FROM ' ||Trim(Databasename)||'.'||Trim(Tablename)||';' (Title '')
FROM DBC.TABLES
WHERE CREATORNAME='xyz'
AND TABLEKIND='T'
;
.Export report file=del_app_work.sql
.run file = del_app_work.run
.logoff
.quit
Comments
Post a Comment