![]() | ![]() | ![]() |
You can access the sample library programs from within SAS software as follows:
In SAS 7 and SAS 8, select Help->SAS System Help. Select Sample SAS Programs and Applications in the right pane or use the Contents tab in the left pane. Prior to SAS 7, select Help->Sample Programs.
You can also access the sample programs directly via the include command using this path:
!sasroot/<prod>/sample/<filename>.sasor
!sasroot\<prod>\sample\<filename>.saswhere !sasroot is understood by SAS to be the location of your SAS directory (usually C:\SAS). Replace <prod> with the SAS product name (for example, stat, iml, qc, and so on). For samples in Base SAS software, replace <prod> with core. For example, the following statement that is submitted from the SAS command line copies the GEOMEAN.SAS file into the Program Editor window:
include '!sasroot/core/sample/geomean.sas'
include command using this path:
!sasroot/samples/<prod>/<filename>.saswhere !sasroot is understood by SAS to be the location of your SAS directory (usually C:\SAS). Replace <prod> with the SAS product name (for example, stat, iml, qc, and so on). For samples in Base SAS software, replace <prod> with core. For example, the following statement that is submitted from the SAS command line copies the GEOMEAN.SAS file into the Program Editor window:
include '!sasroot/core/sample/geomean.sas'
include 'sas.sas82.sample(geomean)'
include command using this path:
SAS$SAMPLES:[<prod>]<filename>.sasreplacing <prod> with the SAS product name (for example, stat, iml, qc, and so on). For samples in Base SAS software, replace <prod> with core. For example, the following statement that is submitted from the SAS command line copies the GEOMEAN.SAS file into the Program Editor window:
include 'sas$samples:[core]geomean.sas'
include command using this path:
!saspath:sample:<prod>:<filename>.sas
where !saspath is understood by SAS to be the location of your SAS folder. Replace <prod> with the product name (for example, stat, iml, qc, and so on). For samples in Base SAS software, replace <prod> with core. For example, the following statement that is submitted from the SAS command line copies the GEOMEAN.SAS file into the Program Editor window:
include '!saspath:sample:core:geomean.sas'
| Product Family | Product | System | SAS Release | |
| Reported | Fixed | |||
| SAS System | N/A | All | n/a | |
| Type: | Usage Note |
| Priority: | low |
| Date Modified: | 2005-10-28 14:25:52 |
| Date Created: | 2002-12-16 10:56:48 |



