[R] SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas) rdeangel at amgen.com
Tue Apr 6 00:41:42 CEST 2010


Hi,

  Here is the SAS command macro that reads what I highlight in my editor and
prints 40 observations from the highlighted dataset after hitting the
function key F4

F4 stores the highlighted text in the clipboard then executes the command
macro, the rsubmit executes the code on the unix zeus server. (Slight
modification on the rsubmit for clarity only)

Function key setting

F4         store;note;notesubmit '%uxp';       /* 40  obs from highlighted
dataset       */   

Command macro

%macro uxp;                                 
FILENAME clp clipbrd ;                      
DATA _NULL_;                                
  INFILE clp;                               
  INPUT;                                    
  put _infile_;                             
  call symputx('argx',_infile_);            
RUN;                                        
dm "out;clear;";                            
%put argx=&argx.;                           
%syslput argx=&argx;                        
rsubmit zeus;                                    
footnote;                                   
title "Up to 40 obs from &argx";            
options nocenter;                           
proc print data=&argx( Obs= 40 ) width=min; 
format _all_;                               
run;                                        
endrsubmit zeus;                                 
dm "out;top";                               
%mend uxp;                                  

-- 
View this message in context: http://n4.nabble.com/SAS-and-R-on-multiple-operating-systems-tp1752043p1752189.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list