Search notes:
Using vim/gvim with SAS
It's possible to use
Vim to write statements for execution in
SAS .
An empty file needs to be created. This files will be
tail'ed to the sas executable.
The > $filename
construct empties an existing file or creates a new one.
$ > /share/home/tq84/sas/sas.redir
The sas executable is stared. It takes the input from the sas.redir
file:
$ tail -f /share/home/tq84/sas/sas.redir | /usr/app/sas/config/Lev1/SASApp_01/sas.sh -nodms -noterminal
The log file is
tail'ed
into the perl script
highlight-sas-log.pl [highlight-sas-log.pl` to highlight it.
$ tail -f -n 100 /share/home/tq84/sas/sas.log | highlight-sas-log.pl
Finally, vim or gvim is started:
$ vim /share/home/tq84/sas/stmts.sas
From vim, the statements to be executed in sas by appending the statements to the sas.redir
file. The statements to be executed need to be visually selected.
:'<,'> w >> /share/home/tq84/sas/sas.redir