Previous Page | Next Page

Dictionary of ODS Language Statements

LIBNAME Statement, SASEDOC



Uses the SASEDOC engine to associate a SAS libref (library reference) with one or more ODS output objects that are stored in an ODS document.
Valid: anywhere
Category: ODS: Output Control
Restriction: The LIBNAME statement that is used with the SASEDOC engine provides read access to an output object. You cannot write an output object to a library with the SASEDOC engine, but you can delete or rename a data set.

Syntax
Required Arguments
SASEDOC Engine Options
Additional LIBNAME Statement Arguments and Options
Details
Using the LIBNAME Statement
Examples
Example 1: Assigning a LIBNAME to an ODS DOCUMENT
See Also

Syntax

LIBNAME libref SASEDOC 'path' <sasedoc-engine-option> <options>;


Required Arguments

libref

is a shortcut name or a nickname for the aggregate storage location where your SAS files are stored. It is any SAS name that you choose for assigning a new libref. When you are disassociating a libref from a SAS library, or when you are listing attributes, specify a libref that was previously assigned or else use the CLEAR argument.

Tip: The association between a libref and a SAS library lasts only for the duration of the SAS session or until you change it or discontinue it with another LIBNAME statement for the same libref.
SASEDOC

is the name of the engine that associates a SAS libref (library reference) with one or more ODS output objects that are stored in an ODS document.

path

is the fully specified location of an ODS document directory.


SASEDOC Engine Options

DOC_SEQNO=sequence-number

permits you to specify the sequence number of the output object to be accessed. This is necessary when multiple output objects that are in the same directory have the same name. By default, the SASEDOC LIBNAME engine can access only the most recently created output object, which might not be the one that you want to access. Specify DOC_SEQNO to override the default.

sequence-number

is a number which, when combined with a pathname, uniquely identifies the entry in the directory.

See also: Understanding Sequence Numbers

Additional LIBNAME Statement Arguments and Options

For additional arguments and options that are valid for the LIBNAME statement, see the LIBNAME statement in SAS Language Reference: Dictionary.


Details


Using the LIBNAME Statement

The SASEDOC LIBNAME engine permits you to access output objects that are stored in an ODS document. A data set that is accessed by using the SASEDOC LIBNAME engine might differ structurally from one created by replaying the ODS document output object to the ODS OUTPUT destination. This is because the ODS OUTPUT destination recognizes the output object's template, but the SASEDOC LIBNAME engine does not.


Examples


Example 1: Assigning a LIBNAME to an ODS DOCUMENT

LIBNAME statement:

Option:

DOC_SEQNO=

ODS DOCUMENT statement:

Option:

NAME=

Other SAS features:

PROC DATASETS

PROC GLM

PROC PRINT

Data Sets:

Creating the Plants Data Set.

Creating the Plant_Stat Data Set.


Program Description

This example assigns a libref to an ODS document directory that contains four output objects created by PROC GLM. The four output objects are tables:

Overall ANOVA

Fit statistics

Type I model ANOVA

Type III model ANOVA


Program

 Note about code
ods document name=sasuser.odsglm(write);
 Note about code
proc glm  data=plant_stats; 
  class month;
  model age age2 age3=month / nouni; 
  manova h=month /print;
run;
 Note about code
proc glm  data=plants order=data;
   class type block;
   model stemleng=type block;
   means type;
   contrast 'compost vs others'  type -1 -1 -1 -1  6 -1 -1;
   contrast 'river soils vs.non' type -1 -1 -1 -1  0  5 -1,
                                 type -1  4 -1 -1  0  0 -1;
   contrast 'glacial vs drift'   type -1  0  1  1  0  0 -1;
   contrast 'clarion vs webster' type -1  0  0  0  0  0  1;
   contrast 'knox vs oneill'     type  0  0  1 -1  0  0  0;
quit;  
 Note about code
ods document close;
 Note about code
libname mylib sasedoc '\sasuser.odsglm\glm\anova#1\stemleng';
 Note about code
proc datasets lib=mylib;
run;
quit;
 Note about code
proc print data=mylib.modelanova;
run;
proc print data=mylib.modelanova(doc_seqno=1);
run;

Output

Explorer Window

 Note about figure

[Explorer Window]

The Contents of Mylib

 Note about figure

[The Contents of Mylib]


See Also

Procedures:

Document Procedure

Statements:

ODS DOCUMENT Statement

ODS TRACE Statement

Previous Page | Next Page | Top of Page