-- Copyright © Oracle Corporation 1995. All Rights Reserved. -- This SQL module provides the SQL procedures needed by the -- SQL$LOAD_JOBS.BAS program. The module illustrates how to use -- SQL module language to load a database. ------------------------------------------------------------------------------- -- Header Information Section ------------------------------------------------------------------------------- MODULE SQL_LOAD_JOBS_BAS -- Module name LANGUAGE BASIC -- Language of calling program AUTHORIZATION SQL_SAMPLE -- Provides default db handle PARAMETER COLONS ------------------------------------------------------------------------------- -- DECLARE Statements Section ------------------------------------------------------------------------------- DECLARE ALIAS FILENAME 'PERSONNEL' -- Declaration of the database. ------------------------------------------------------------------------------- -- Procedure Section ------------------------------------------------------------------------------- -- This procedure uses the executable statement SET TRANSACTION to -- start a transaction. PROCEDURE SET_TRANSACTION SQLCODE; SET TRANSACTION READ WRITE RESERVING JOBS FOR EXCLUSIVE WRITE; -- This procedure inserts a row in the JOBS table. The list of names in -- the VALUES clause corresponds to the parameter list for the procedure. PROCEDURE INSERT_JOBS SQLCODE :P_JOB_CODE CHAR(4), :P_WAGE_CLASS CHAR(1), :P_JOB_TITLE CHAR(20), :P_MINIMUM_SALARY INTEGER, :P_MAXIMUM_SALARY INTEGER; INSERT INTO JOBS VALUES (:P_JOB_CODE,:P_WAGE_CLASS,:P_JOB_TITLE, :P_MINIMUM_SALARY,:P_MAXIMUM_SALARY ); -- This procedure commits the transaction. PROCEDURE COMMIT_TRANS SQLCODE; COMMIT; -- This procedure rolls back the transaction. PROCEDURE ROLLBACK_TRANS SQLCODE; ROLLBACK;