Steps to writing and running a SAS program

The italicized monospace font is what you will see on the monitor.
The bold monospace is what you will type.
 

  1. Log on to the UNIX system.

  2.  
  3. Change to the class directory.

  4.  
        stats> cd PSY530
  1. Open the Pico editor, naming the file something relevant with a .sas extension (for example, hw1.sas).
    •  
        stats> pico yourfile.sas
  1. Now you are in the pico editor. Type in the SAS program.
      •  
  2. Exit pico by pressing Control-X. Make sure you answer yes to save the program.

  3.  
  4. Run the program.
        stats> sas yourfile.sas
         
  1. Look at the log to check for errors.
        •  
        stats> pico yourfile.log
           
  2. If you have errors, return to the program and correct them.
          •  
        stats> pico yourfile.sas
             
  3. Repeat steps 5 through 7, until there are no errors.

  4.  
  5. Look at your output.
            •  
        stats> pico yourfile.lst
               
  6. Print your program and output
      •  
        stats> lpr yourfile.sas yourfile.lst
         
         


 

Steps to writing and running a SPSS program

The italicized monospace font is what you will see on the monitor.
The bold monospace is what you will type.

  1. Log on to the UNIX system.

  2.  
  3. Change to the class directory.
      •  
        stats> cd PSY530
                 
  4. Open the Pico editor, naming the file something relevant with a .sps extension (for example hw1.sps).
      •  
        stats> pico yourfile.sps
                 
  5. Now you are in the pico editor. Type in the SPSS program.

  6.  
  7. Exit pico by pressing Control-X. Make sure you answer yes to save the program.

  8.  
  9. Run the program.
                1.  
        stats> spss -m <yourfile.sps>yourfile.out
                 
  10. If you have errors they will automatically appear on the screen. You need to return to the program and correct them. If you have no errors skip to step 9.
              •  
        stats> pico yourfile.sps
                 
  11. Repeat steps 5 and 6, until there are no errors.

  12.  
  13. Look at your output.

  14.  
        stats> pico yourfile.out
                 
  15. Print your program and output
                1.  
        stats> lpr yourfile.sps yourfile.out