Date: Wed, 19 Jun 1996 01:53:00 GMT
Reply-To: Mike Little <little@CASTER.SSW.UPENN.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Mike Little <little@CASTER.SSW.UPENN.EDU>
Organization: University of Pennsylvania
Subject: Re: Extracting var length and format
Michael Little (little@psci.sas.upenn.edu) wrote:
: Hi,
: Is there any method similar to the CALL LABEL() routine to find the
: length of a SAS variable (both char and numeric) and any date format
: that was permanently associated with numeric vars? I suppose I can
: always grep from a Proc Contents (SAS 6.11 for AIX), but I'd like a more
: elegant way. (Or is it just soooo simple and I don't see it?)
: Thanks,
: Mike
Well, I'm answering my own question... but only because the lightbulb
came on after I suggested in another thread that someone look up
in the SAS-L archives Phil Mason's post under the subjet,
"Re: How to export SAS dataset to Excel ?" (from 1994).
He uses an output dataset created in Proc Contents. Oh. I never did this
in any of my own programs. It works! Cool. FORMAT and LENGTH are var names,
and there's one obs per variable. The TYPE var is 1 for numeric, 2 for
character. All the info I need!
I wish I could answer all my questions by helping others to answer their
questions!
Still: Why does SAS have a CALL LABEL routine but not other contents-related
routines?
- Mike
--
Michael Little, Social Science Computing
353 McNeil, phone: 215-573-3331, 215-898-6454
little@ssc.upenn.edu