Previous Page | Next Page

Macro Functions

%SYSPROD Function



Reports whether a SAS software product is licensed at the site.
Type: Macro function
See also:

%SYSEXEC Statement

SYSSCP and SYSSCPL Automatic Macro Variables

SYSVER Automatic Macro Variable


Syntax
Details
Example
Verifying SAS/GRAPH Installation Before Running the GPLOT Procedure

Syntax

%SYSPROD (product)

product

can be a character string or text expression that yields a code for a SAS product. The following are 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:

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


Example 1: 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;

Previous Page | Next Page | Top of Page