Running SAS Jobs

To run SAS programs in UNIX, use the command:

     sas myprogram.sas .

Because the default work drive was set to be /work, you may have to check the /work to see whether it's full before running the program. If /work is nearly full, you can define your work drive by

    sas -work /work2 myprogram.sas

or

   sas -work /work3 myprogram.sas .

Delete the Work Files

If you run a SAS program, all the intermediate work files will be hold in the default work drive until your SAS program finishes. A lot of space will be taken if you are working with large data sets. If there are several users running SAS programs at the same time and all of them work with large data sets, the /work drive will be filled up very soon and consequently, all jobs will be stopped or hung in the system. To avoid this, you can delete the SAS file if you no longer need them by:

proc datasets library=work;

  delete one;

where work is the default /work drive assigned  by system and if you run a SAS job by " sas *.sas ".  if you run the SAS job by "sas -work /work2  *.sas ", you should substitute work by work2. One is a SAS data set created in previous statemens of your program.You can also delete the files from other SAS data library. For example :

libname dong '/work/dong/';

data one;

   set dong.data1;

   ....

data two;

   set one;

   ...

proc datasets library=dong;

   delete one two;

run;