%SYSPROD Function

Reports whether a SAS software product is licensed at the site.
Type: Macro function
See: %SYSEXEC Statement, SYSSCP and SYSSCPL Automatic Macro Variables, and SYSVER Automatic Macro Variable

Syntax

%SYSPROD (product)

Required Argument

product
can be a character string or text expression that yields a code for a SAS product. The following are commonly used codes:
Commonly Used Codes
AF
CPE
GRAPH
PH-CLINICAL
ASSIST
EIS
IML
QC
BASE
ETS
INSIGHT
SHARE
CALC
FSP
LAB
STAT
CONNECT
GIS
OR
TOOLKIT
For codes for other SAS software products, see your on-site SAS support personnel.

Details

%SYSPROD can return the following values:
%SYSPROD Values and Descriptions
Value
Description
1
The SAS product is licensed.
0
The SAS product is not licensed.
−1
The product is not Institute software (for example, if the product code is misspelled).

Example: Verifying SAS/GRAPH Installation Before Running the GPLOT Procedure

This example uses %SYSPROD to determine whether to execute a PROC GPLOT statement or a PROC PLOT statement, based on whether SAS/GRAPH software has been installed.
%macro runplot(ds);
   %if %sysprod(graph)=1 %then
      %do;
         title "GPLOT of %upcase(&ds)";
         proc gplot data=&ds;
            plot style*price / haxis=0 to 150000 by 50000;
         run;
         quit;
      %end;
   %else
      %do;
         title "PLOT of %upcase(&ds)";
         proc plot data=&ds;
            plot style*price;
         run;
         quit;
      %end;
%mend runplot;
%runplot(sasuser.houses)
When this program executes and SAS/GRAPH is installed, the following statements are generated:
TITLE "GPLOT of SASUSER.HOUSES";
PROC GPLOT DATA=SASUSER.HOUSES;
PLOT STYLE*PRICE / HAXIS=0 TO 150000 BY 50000;
RUN;