home *** CD-ROM | disk | FTP | other *** search
- rem
- rem $Header: bank_demo.sql,v 6.1 90/02/16 18:39:53 nsalah Exp $ bank_demo.sql Copyr (c) 1989 Oracle
- rem
- rem V6PLS10030,DISK$DEV2:[PLS1FREEZE.DEMO.10030]
- /* Shows how PL/SQL can run from within 3GLs such as C. It shows how */
- /* PL/SQL can read and write from the C variables. */
-
- set termout off
- START load_acct
- commit;
- set termout on
-
- prompt >>>>> Here are the accounts and balances in our ACCOUNTS table:
- select * from accounts;
-
- prompt >>>>> Here's the JOURNAL table that shows what transactions have
- prompt >>>>> taken place. It is currently empty:
- select * from journal;
-
- prompt >>>>> Now let's run a C program that has a PL/SQL procedure
- prompt >>>>> embedded within it. Look at the text of the original program
- prompt >>>>> (BANK_DEMO.PC), and then run the BANK_DEMO program.
- prompt >>>>> (Note how PL/SQL can read and set the values of the C variables.)
- prompt
- prompt >>>>> When done, return to SQL*Plus by typing the exit command
- prompt >>>>> at the operating system prompt.
- prompt >>>>> Hit return to continue...
- pause
-
- host
-
- prompt >>>>> Hit return to see the effects of your changes on the ACCOUNTS
- prompt >>>>> table...
- pause
- select * from accounts;
-
- prompt >>>>> Hit return to see the changes logged in the JOURNAL table...
- pause
- select * from journal;
-