Date: Tue, 11 Dec 2001 06:58:39 +1100
Reply-To: doug <jjjjj998@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: doug <jjjjj998@HOTMAIL.COM>
Organization: Customer of Telstra Big Pond Direct
Subject: Re: Alternative to CARDS; in a macro?
An untested idea - perhaps try using sql and reading in the data that way.
Michael Friendly <firstname.lastname@example.org> wrote in message
> I'm writing a macro which needs a data set containing constant information
> of labels and other control variables. Normally, I would put this in
> a datastep, using CARDS; (or DATALINES;), but these can't be used inside
> a macro.
> One alternative is to put this information in a separate file, and
> read it with an INFILE statement, but then the macro is not
> and I need to worry about how to reference the external file on
> different operating systems.
> Another alternative is to construct a data set with a long series of
> assignment and output statements, e.g.,
> data control;
> _name_='N'; label='Sample size'; type='a0'; .... output;
> _name_='NPARM'; label='Number of parameters'; type='a0'; .... output;
> But, this is really tedious and ugly. Is there anything simpler I've
> Michael Friendly Email: email@example.com (NeXTmail OK)
> Psychology Dept
> York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
> 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
> Toronto, ONT M3J 1P3 CANADA