Sample 26143: SAS Install detector version 9
SAS Install detector version 9
**********************************************************;
* SAS Install detector version 9 *;
* Purpose: to show what V9 SAS products are installed *;
* based on a directories and executables installed *;
* on the system *;
* Limitations: While the program checks directories *;
* and certain individual files it cannot check every *;
* single file present *;
* Note: if no access products are installed there *;
* may be errors in the access checking section. *;
* The same thing can happen with Enterprise Guide sector *;
* Jan 13 2002 - added Enterprise Guide 2.0 search *;
**********************************************************;
options formdlm='-';
dm wpgm 'clear output' wpgm;
dm wpgm 'clear log' wpgm;
******************************************************************************;
* Change these filenames to reflect where SAS is installed on your system *;
* Please check to see if the access directory is there before running the *;
* Access checking code farther down in the program *;
******************************************************************************;
filename file1 pipe 'dir "c:\program files\sas\SAS System\9.0"';
filename file2 pipe 'dir "c:\program files\sas"';
filename file3 pipe 'dir "C:\Program Files\SAS\SAS System\9.0\access\sasexe"';
filename file4 pipe 'dir "c:\program files\SAS\sas System\9.0\access\sasmacro"';
filename file5 pipe 'dir "c:\program files\SAS\sas system\9.0\access\sashelp"';
*******************************************************************;
* First we read in the data for the SAS system itself *;
* to determine what products are installed under SAS itself *;
*******************************************************************;
data temp1;
infile file1 truncover;
input var1 $ 1-100;
tester=substr(var1,26,3);
product=substr(var1,40,30);
run; quit;
data temp2;
set temp1;
if _n_ > 2;
if tester = 'DIR' and product ^= '.';
if tester='DIR' and product ^= 'SASCFG';
if tester='DIR' and product ^='..';
keep product;
product=upcase(product);
run;
proc sort;
by product;
run; quit;
**************************************************************;
* Then we check to see what top level products are installed *;
* in addition to the SAS system. Examples include SAS *;
* Eminer Tree Viewer, SAS System Viewer etc. *;
**************************************************************;
data temp4;
infile file2 truncover;
input var1 $ 1-100;
tester=substr(var1,26,3);
product=substr(var1,40,30);
run; quit;
data temp5;
set temp4;
if _n_ > 2;
if tester = 'DIR' and product ^= '.';
if tester = 'DIR' and product ^= '..';
keep product;
product=upcase(product);
if product ^= 'SETUP LOGS';
run;
proc sort; by product;
***********************************************************;
* Then we print out the SAS products and SAS components *;
* that are installed *;
***********************************************************;
proc print noobs data=temp5;
title 'SAS Insitute Applications Installed';
run; quit;
proc print noobs data=temp2;
title 'SAS Software Products Installed';
run; quit;
********************************************************************;
* Checking for access products *;
* If you do not have any access products do not run the code beyond*;
* this line please *;
********************************************************************;
data tempacc;
infile file3 truncover;
input accvar1 $ 1-100;
run; quit;
data tempacc2; set tempacc;
if _n_ > 7;
dllprod=substr(accvar1,40,12);
run;
data tempacc3; set tempacc2;
if (dllprod='sasimode.dll') or (dllprod='sasioodb.dll')
or (dllprod='sasiosyb.dll') or (dllprod='sasioora.dll')
or (dllprod='sasiotra.dll')
or (dllprod='sasiodbu.dll') or (dllprod='sasioole.dll');
run;
data tempacc4; set tempacc3;
length prodinst $ 40;
if (dllprod='sasimode.dll') then prodinst='Access to PC File Formats';
if (dllprod='sasioodb.dll') then prodinst='Access to ODBC';
if (dllprod='sasiosyb.dll') then prodinst='Access to Sybase';
if (dllprod='sasioora.dll') then prodinst='Access to Oracle';
if (dllprod='sasiotra.dll') then prodinst='Access to Teradata';
if (dllprod='sasiodbu.dll') then prodinst='Access to DB2';
if (dllprod='sasioole.dll') then prodinst='Access to OLE/DB';
run; quit;
data tempacc5;
infile file4 truncover;
input accvar1 $ 1-100;
run; quit;
data tempacc6; set tempacc5;
if _n_ > 7;
dllprod=substr(accvar1,40,12);
run;
data tempacc7; set tempacc6;
if dllprod='baan.sas' or dllprod='r3access.sas'
or dllprod='bwaccess.sas';
Length prodinst $ 40;
if dllprod='bwaccess.sas' then prodinst='Access to SAP BW';
if dllprod='r3access.sas' then prodinst='Access to R3';
if dllprod='baan.sas' then prodinst='Access to Baan';
data tempacc8;
infile file5 truncover;
input accvar1 $ 1-100;
run; quit;
data tempacc9; set tempacc8;
if _n_ > 7;
dllprod=substr(accvar1,40,16);
if dllprod='accpeo.sas7bcat';
if dllprod='accpeo.sas7bcat' then prodinst='Access to Peoplesoft';
run;
data accfinal; set tempacc4 tempacc7 tempacc9;
run;
proc sort data=accfinal nodupkey;
by prodinst;
run; quit;
*******************************************************************;
* Then we print the access products *;
*******************************************************************;
proc print data=accfinal;
var prodinst;
title 'Access Products Installed';
run ; quit;
SAS Install detector version 9
Purpose: to show what V9 SAS products are installed based on a directories and executables installed on the system
| Date Modified: | 2007-03-14 03:03:12 |
| Date Created: | 2007-03-14 03:03:12 |
Operating System and Release Information
| SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | n/a |