Date: Fri, 18 Nov 2005 08:49:44 -0500
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: log creation
Hi Dirk,
Indeed, that is because macro values have no leading and trailing blanks
and after the second iteration of the loop the value of X is (as thought
of, you could insert a %PUT statement):
1 $ 2 $ 1 $ 2 $ 3 $
and so on; and that code is illegal in an INPUT statement without variable
names.
Regards - Jim.
--
Y. (Jim) Groeneveld, MSc., Biostatistician, Vitatron b.v., NL
Jim.Groeneveld_AT_Vitatron.com (replace _AT_ by AT sign)
http://www.vitatron.com, http://home.hccnet.nl/jim.groeneveld
My computer regards me as its master, but I seem to be its slave.
[common disclaimer]
On Fri, 18 Nov 2005 10:23:04 Z, Dirk Nachbar <Dirk.Nachbar@DWP.GSI.GOV.UK>
wrote:
>For some reason SAS doesn't like the 'input &x' below but i don't know why
>
>rsubmit;
>%macro test;
>%let x= 1 $;
>%do i=2 %to 100;
> %let x= &x &i $ ;
>%end;
>%mend;
>%test;
>
>data r000000.log1;
> input &x;
> datalines;
>1 2
>;
>run;
>endrsubmit;
>
>
>
>Dirk Nachbar
>Assistant Economist
>Pensim2
>Department for Work and Pensions
>Level 4, The Adelphi
>1-11 John Adam St
>WC2N 6HT London
>020 796 28531
>**********************************************************************
>This document is strictly confidential and is intended only for use by the
addressee.
>If you are not the intended recipient, any disclosure, copying,
distribution or other
>action taken in reliance of the information contained in this e-mail is
strictly prohibited.
>Any views expressed by the sender of this message are not necessarily
those of the Department
>for Work and Pensions.
>If you have received this transmission in error, please use the reply
function to tell us
>and then permanently delete what you have received.
>Please note: Incoming and outgoing e-mail messages are routinely monitored
for compliance
>with our policy on the use of electronic communications.
>**********************************************************************
>
>
>
>The original of this email was scanned for viruses by the Government
Secure Intranet (GSi) virus scanning service supplied exclusively by Cable
& Wireless in partnership with MessageLabs.
>
>On leaving the GSi this email was certified virus-free
|