Re: How to save commands into a file then run them again?

From: Roderick Scott <rscott_at_ra.csc.ti.com>
Date: Tue, 20 Oct 1992 14:02:40 GMT
Message-ID: <1992Oct20.140240.20748_at_csc.ti.com>


In article <1bqit4INNbdf_at_manuel.anu.edu.au> cxd653_at_huxley.anu.edu.au (Chunping Ding) writes:
>When I use sqlplus to organize a report, I have to write many
>commands, for example,
>
>SQL> title center 'Test report';
>SQL> column ename heading "Employee|name' format A8;
>SQL> set pagesize 100;
>SQL> set linesize 88;
>SQL> select *
>2 from emp
>3 where depno = 30;
>

Try This:

SQL > Input
  1 Clear Breaks;
  2 Clear Columns;
  3 title center 'Test report';
  4 column ename heading "Employee|name' format A8;   5 set pagesize 100;
  6 set linesize 88;
  7 select *
  8 from emp
  9 where depno = 30;
SQL > save Filename
  Wrote File Filename  

To Run The Command file, enter:

SQL > start Filename;

This Should Works...

 >Is there any method to save all the commands into a file, then run the
>file? Do I have to type all the commands every time? I know I can save
>all the commands after "select *". But I do not know how to save the
>commands such as set, column etc.
>
>Could anyone give me some help?
>
>Your help will be very much appreciated?
>
>Ding Chunping
>
>________________________________________________________________________
>
>(Mr.) Ding Chunping Telephone 61 6 249 4205 or 61 6 249 2066
>Geology Department Fax 61 6 249 5544
>Australian National University Email: cxd653_at_huxley.anu.edu.au
>GPO Box 4, Canberra, ACT 2601 ding_at_basins.anu.edu.au
>Australia ding_at_grafix.anu.edu.au
>________________________________________________________________________

-- 
Roderick Scott|This Line Intentionally Left Blank|Texas Instruments
rscott_at_ti.com |				         |Fax (214) 995-0403
Received on Tue Oct 20 1992 - 15:02:40 CET

Original text of this message