Application Programming Interface Guide > DSL API > DSL Support in SQL Scripts > Examples
 
Examples
Script containing multiple DSL statements
CREATE SCRIPT /shared/examples/testscript DEFINE AS PROCEDURE pubdbScr3()
BEGIN
CREATE VIRTUAL DATABASE 'PUB5';
CREATE VIRTUAL TABLE /services/databases/PUB5/link2 SET TARGET /shared/examples/ds_orders/tutorial/view1;
END
Script containing multiple DSL statements - Impacted
CREATE SCRIPT /shared/examples/testscript DEFINE AS PROCEDURE pubdbScr3()
BEGIN
CREATE VIRTUAL DATABASE 'PUB5';
DROP VIRTUAL DATABASE 'PUB5';
CREATE VIRTUAL TABLE /services/databases/PUB5/link2 SET TARGET /shared/examples/ds_orders/tutorial/view1;
END
The above example shows an impacted procedure because the virtual database 'PUB5' is being deleted before virtual table is created under 'PUB5'. Hence the IMPACT_MESSAGE of "testscript" procedure will show the error message.