SYSPROD Function
Determines whether a product is licensed.
| Category: | Special |
|---|---|
| Restriction: | This function is not supported in a DATA step that runs in CAS. |
Table of Contents
Syntax
Required Argument
product-name
specifies a character constant, variable, or expression with a value that is the name of a SAS product.
| Requirement | Product-name must be the correct official name of the product or solution. |
|---|
Details
The SYSPROD function returns 1 if a specific SAS software product is licensed, 0 if the SAS software product is not licensed for your system, and –1 if the product name is not recognized. If SYSPROD indicates that a product is licensed, it means that the final license expiration date has not passed.
It is possible for a SAS software product to exist on your system even though the product is no longer licensed. In this case, SAS cannot access this product. Similarly, it is possible for a product to be licensed but not installed.
Use SYSPROD in the DATA step, in an IML step, or in an SCL program.
You can list all of the licensed products on your system with this code:
proc setinit;
run;
Example
data one;
/* If SAS/GRAPH software is currently licensed, then SYSPROD
returns a value of 1.
If SAS/GRAPH software is not currently licensed, then SYSPROD
returns a value of 0. */
a=sysprod('graph');
/* SYSPROD returns a value of –1 because ABC is not a valid
product name. */
b=sysprod('abc');
/* SYSPROD always returns a value of 1 because the Base product
must be licensed
for the SYSPROD function to run successfully. */
c=sysprod('base');
d=sysprod('base sas');
put a=;
put b=;
put c=;
put d=;
run;
These statements produce these results:
a=1 b=-1 c=1 d=1