Sample 24767: Using suboptions on the FILE PRINT ODS statement to override default name and label of an ODS output object
Provide a meaningful name and label to the DATA step's
output object.
Note: This example uses ODS TRACE to show the object's name in
the SAS log. A PDF file is also created to illustrate
how OBJECTLABEL= changes the table of contents.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
options nodate;
title;
/* Create user-defined format */
proc format;
value $cntry 'BRZ'='Brazil'
'CHN'='China'
'IND'='India';
run;
ods trace on;
ods pdf file='c:\temp\LeadingGrain.pdf';
data _null_;
length Country $ 3 Type $ 5;
input Year country $ type $ Kilotons;
format country $cntry.;
label type='Grain';
file print ods=(object=Produce
objectlabel='Leading Grain'
);
put _ods_;
datalines;
1995 BRZ Wheat 1516
1995 BRZ Rice 11236
1995 BRZ Corn 36276
1995 CHN Wheat 102207
1995 CHN Rice 185226
1995 CHN Corn 112331
1995 IND Wheat 63007
1995 IND Rice 122372
1995 IND Corn 9800
;
ods pdf close;
ods listing;
ods trace off;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Output from ODS TRACE as written to the log before overriding
OBJECT= and OBJECTLABEL=...N is replaced with a number
Output Added:
-------------
Name: FilePrintN
Label: FilePrintN
Template: base.datastep.table
Path: Datastep.FilePrintN
Output from ODS TRACE after OBJECT= and OBJECTLABEL= options
are used on the FILE PRINT ODS statement
Output Added:
-------------
Name: Produce
Label: Leading Grain
Template: base.datastep.table
Path: Datastep.Produce
-------------
PDF OUTPUT
Click here for PDF output
Provide a meaningful name and label to the DATA step's
output object.
| Type: | Sample |
| Topic: | Query and Reporting ==> Creating Reports ==> Non Graphical SAS Reference ==> ODS (Output Delivery System) SAS Reference ==> DATA Step
|
| Date Modified: | 2005-12-08 11:34:32 |
| Date Created: | 2004-09-30 14:09:12 |
Operating System and Release Information
| SAS System | Base SAS | All | 8 TS M0 | n/a |