Date: Tue, 27 Apr 2004 09:48:54 -0400
Reply-To: "Sinclair-James, Brian (HHS/OS)" <Brian.Sinclair-James@HHS.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Sinclair-James, Brian (HHS/OS)" <Brian.Sinclair-James@HHS.GOV>
Subject: Re: FORMAT questions
Content-Type: text/plain; charset="iso-8859-1"
>Why *do* people want to stick 'fmt', or worse 'format' into the names of
formats,
I work with a lot of secondary datasets which have hundreds to thousands of
variables with differing formats, and I have to pass my code to a variety of
people who may want to use it in nefarious ways. The easiest way to remember
and work with the formats, is to append an f at the end of the variable
name. It is easy to comment and convey what is happening. To simply reuse
the variable name creates potential confusion; to invent new names stretches
my creativity, and requires lookups. While context and periods point out
what is a format versus what isn't, a missing period has different
implications based on whether what remains is a defined or undefined
variable.
consider
format aaa aaa bbb bbb.;
versus
format aaa. aaaf bbb bbbf.;
The first generates no errors or warnings (at least in 8.2). The second
still requires that you look at the log, but I try my hardest to get people
to glance through them. The list _output_ doesn't always make clear that the
wrong format has been applied.
-----Original Message-----
From: Jack Hamilton [mailto:JackHamilton@FIRSTHEALTH.COM]
Sent: Monday, April 26, 2004 8:51 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: FORMAT questions
"David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV> wrote:
>Why *do* people want to stick 'fmt', or worse 'format' into the names
of
>formats, when we have so few characters to work with in the names
>anyway?
Beats me. It's always clear from context whether a word is a format
name or something else, and almost always clear just from the word alone
(a format name almost always contains a period, and almost no other
token ever does, at least not in base SAS - the only exception I can
think of is a summary variable inside a compute block in PROC REPORT).
I suppose it's a symptom of not knowing SAS very well.
--
JackHamilton@FirstHealth.com
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA