Wednesday, February 9, 2011

Create transport file and Read in transport file

*** Create transport file;

libname source "/home/kwxxx/requests/xxxdata";
libname tran xport "/home/kwxx/requests/xxxdata/transport/xxxdata.xpt";

proc copy in=source out=tran memtype=data;
run;

*** Read in transport file;

libname library ‘c:\kwxxx’;
libname tran xport ‘c:\kwxxx\xxxdata.xpt’;

proc copy in=tran out=library;
run;

*** If format was included as a dataset in the transport file, need to convert the dataset back to format library;

proc format library=library cntlin=library.fmtout;
run;

Monday, February 7, 2011

How to kill a Unix SAS job

First, enter the following command to see your SAS job that are currently running:

      ps -ef|grep kwxxxx

And you'll see the output like this:

      kwxxxx 21506 35726 0 11:07:45 pts/15 0:00 vi zzz.sas
      kwxxxx 29200 34432 1 11:27:40 pts/18 0:00 ps -ef
      kwxxxx 30128 34432 0 09:36:54 pts/18 0:00 -ksh
      kwxxxx 30478 1 0 09:36:52 - 0:00 xterm
      kwxxxx 34432 30478 1 09:36:54 pts/18 0:00 -ksh
      kwxxxx 35334 1 0 09:36:51 - 0:00 xterm
      kwxxxx 35726 35334 0 09:36:53 pts/15 0:00 -ksh

The second column is the process number, use the following command to delete the job that you'd like to remove:

      kill -9 process#
      (i.e. kill -9 21506)