Date: Thu, 5 Jun 1997 11:41:35 -0400
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Michael A. Raithel" <MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM>
Subject: Re: label sas data set
Thomas Huang posted the following:
>Is there a way to label a data set other than below:
>data mydata (label='my data label');
>Because my data set is very large and the data step above would take a
>long time just to create the label.
>Any suggestion would be greatly appreciated.
Thomas, you are in luck; there is no need to make a complete pass of
the data just to give the SAS data set a label! There are two ways
that you can approach this particular issue:
1. SAS Display Manager Windows.
A. On the command line invoke the Library window by typing: LIB
B. Select the LIBREF of the SAS data library that contains the data
set that you want to create the label for. In your example, above,
that would be the WORK SAS data library.
C. (You are now in the DIRECTORY window, and should see a list of the
SAS files in your WORK SAS data library). Invoke the RENAME screen
function by placing an R to the left of your target data set--MYDATA
in the example.
D. You may now type in a 40-character data set label. Note, that you
may have to move the window to the left to get to all 40 characters.
2. SAS Proc in Batch or Interactive SAS.
PROC DATASETS LIBRARY=WORK;
MODIFY MYDATA (LABEL='my data label');
SAS data set labels are actually stored in a SAS data library's
Directory, and not in an individual SAS data set's page header. So,
changing your SAS data set's label only affects the SAS data Library's
Directory. It will not disturb the observations that are peacefully
slumbering while you quietly steal into their library to give their
home a 40-character label!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates.
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
...just say a word and I'll be right at your shoulder, thunder and
lightening couldn't be bolder...