Chapter Contents

Previous

Next
%SYSPROD

%SYSPROD



Reports whether a SAS software product is licensed at the site

Type: Macro function
See also:
%SYSEXEC
SYSSCP and SYSSCPL
SYSVER


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. Commonly used codes are

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 SAS site representative.


Details

%SYSPROD can return

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)
Executing this program when SAS/GRAPH is installed, generates the following statements:
TITLE "GPLOT of SASUSER.HOUSES";
PROC GPLOT DATA=SASUSER.HOUSES;
PLOT STYLE*PRICE / HAXIS=0 TO 150000 BY 50000;
RUN;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.