As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Listing Products Installed

From sasCommunity
Jump to: navigation, search

This program reads the list of SAS products installed from sashelp.vOption.Path.

DATA   Products(keep = Product);%* ----- ---------------------------- *;
attrib Product length = $ 16;
file   Log;
set    SAShelp.vOption(where =(OptName eq 'PATH'));
put    'sasroot: ' "%sysget(sasroot)"
  /    'sasext0: ' "%sysget(sasext0)";
Setting = compbl(translate(tranwrd(Setting,'\sasexe',' ')
                          ,' ','!()"'   ,' ','00'x   ,' ','0D'x
                          ,' ','0A'x    ,' ','0C'x   ,' ','3A'x
                          )%*get rid of special characters;
                );
put    'before : ' Setting=;
Setting = compbl(translate(tranwrd(Setting,'sasroot\',' ')
                          ,' ','()"')   );
Setting = compbl(translate(tranwrd(Setting,'sasext0\',' ')
                          ,' ','()"')   );
put    'after  : ' Setting=;

put /  "%sysfunc(getoption(SysIn))"
    /  'task: compare with Product list in macro PassInfx'  /;

dim = length(Setting) - length(compress(Setting));%*count words;
put  '                  ' dim=;

do   I = 1 to dim;                Product = scan(Setting,I,' ');
     if   Product ne ' ' then do; put '%Let Info' I '=' Product @24 ';';
                                  output;   end;
     else leave;
     end;%*do I to dim;           put '     end list .........:';
stop; run;%* ........................... ............................ *;

PROC Print data = &SysLast.;
run;

This code is from A SAS Usage Database Suite.

--macro maven == the radical programmer 13:56, 7 February 2008 (EST)