Date: Mon, 18 Nov 2002 16:35:09 -0500
Reply-To: Howard_Schreier@ITA.DOC.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard_Schreier@ITA.DOC.GOV
Subject: Re: To and Fro Mnemonic, Numeric and Character
I've never tried to memorize SAS syntax details. It's easy enough to look
them up.
That is, it's easy if you know the name of the procedure or statement or
function or format or whatever. If you don't know that much, it can be
rough.
So I would say it's most important to remember which is which, regarding the
INPUT and PUT functions. What helps me is to remember the close parallel to
the INPUT and PUT *statements*. The INPUT statement is for reading external
files, where typically you have numeric data in character representation
and need to convert to binary representation. The PUT statement generally
does the opposite. So the INPUT function uses an informat to convert
character to numeric, while the PUT function uses a format to convert
numeric to character.
Another suggestion: use the online *doc* rather than help. It's available on
the web. But you work at what must be among the biggest SAS customer sites,
so it is probably on one or more internal servers.
On Mon, 18 Nov 2002 13:16:32 -0500, Mark Moran <mark.k.moran@CENSUS.GOV>
wrote:
>Paul, I meant something that would include helping remember how to write
>the format and informat specifications and their meanings. I guess that
>list would be much too long for a "mnemonic". We have recently moved
>offices, I can't find any SAS books, and when I go to online help on PC SAS
>(Windows version) I see a lot of verbiage but no list of them with their
>definitions.
>
>Mark
>
>>to a SAS 8.2 character variable of some format,
>
>just combine the format with the PUT function as
>
>put(numv, <numeric format specification>) and that is about it.
>
>>and vice versa?
>
>input (chvar, <numeric informat specification>) ...
>
>The rule itself seeming to be perhaps simler than a mnemonic rule that
>could
>replace it, I admit to not having enough imagination to concoct the latter.
>Maybe someone poetically inclined could offer an easy-to-remember rhyme :
>-).
|