Interviewing and Accessing SAS Programmers
Read more »
Interviewing and Accessing SAS Programmers
Read more »
data one;input id $;/* create formatting to preserve leading zeros in excel */cid  =  ' = " '  ||  id  ||  ' " ';cards;00123123980123400034;run;data one (drop=id);      set one;run;ods listing clo...
Read more »
*** 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’;libna...
Read more »
data _null_;      do i=0 to 255;            x=byte(i);            put i= x=;      end;      y=rank('a');      put y=;run;BYTE function results:i=65 -- 90 x=...
Read more »
LAG Function (SAS 9.2 Doc)*** Use a third variable to assign the value from the previous record;array one a b c d;array two e f g h;      do over one;            temp = lag(one);            if...
Read more »
Create delta in the report and label:ods escapechar='^';ods rtf file='temp.rtf'; *** Can be HTML or PDF too;proc report data=sashelp.class nowd ps=40;       col age new;       define new / format=$30. ;/* for the RTF */  &n...
Read more »
options pageno=1 nodate ls=80 ps=64;data u1(keep=x);      seed = 104;      do i = 1 to 5;            call ranuni(seed, x);            output;      end;     ...
Read more »
If a macro variable contains leading or trailing blanks, they can be easily removed without the use of %LEFT or %TRIM. Simply:%let macvar = &macvar;
Read more »