LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Sep 2005 15:59:05 +0200
Reply-To:     Miguel de la Hoz <miguel_hoz@YAHOO.ES>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Miguel de la Hoz <miguel_hoz@YAHOO.ES>
Subject:      Re: Macro Variables
In-Reply-To:  <200509020241.j822LqsP020138@malibu.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1

With that solution I get

%macro ptype; %do i=1 %to 6; proc means data = cli_pro(where =(ptype="&&ptype&i")) noprint; by CLIENT; VAR status BALANCE_1 BALANCE_2 BALANCE_3; output out=cli_&&ptype&i(drop=_freq_ _type_) sum(balance_1)=&&ptype&i; %end; run; %mend; %macro ptype;

AVISO: No se ha resuelto la referencia simbólica aparente PTYPE1AMTEMO.

ERROR 22-322: Error de sintaxis, se espera uno de los siguientes: un nombre, ;, /, CSS, CV,

IDGROUP, IDGRP, KURTOSIS, LCLM, MAX, MAXID, MEAN, MEDIAN, MIN, MINID, N, NMISS,

OUT, P1, P10, P25, P5, P50, P75, P90, P95, P99, PROBT, Q1, Q3, QRANGE, RANGE,

SKEWNESS, STDDEV, STDERR, SUM, SUMWGT, T, UCLM, USS, VAR.

ERROR 202-322: La opción o el parámetro no se reconoce y se pasará por alto .

"Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM> escribió: You are confusing character expressions and code. Try

output out=cli_&&ptype&i(drop=_freq_ _type_) sum(balance_1)=&&ptype&i.amtemo;

Contrast with

newvar = "&&ptype&i" || "amtemo" ;

On Fri, 2 Sep 2005 01:46:57 +0200, Miguel de la Hoz wrote:

>Hello: > >I am trying to run this sentence in order to get new variables, I write &&ptype&i||"amtemo" but it is not working as should do, do you have any idea, please??? > >%macro ptype; > >%do i=1 %to 6; > >proc means data = cli_pro(where =(ptype="&&ptype&i")) noprint; > >by CLIENT; > >VAR status BALANCE_1 BALANCE_2 BALANCE_3; > >output out=cli_&&ptype&i(drop=_freq_ _type_) sum(balance_1) =&&ptype&i||"amtemo"; > >%end; > >run; > >%mend; > > > > >--------------------------------- > >Correo Yahoo! >Comprueba qué es nuevo, aquí >http://correo.yahoo.es

---------------------------------

Correo Yahoo! Comprueba qué es nuevo, aquí http://correo.yahoo.es


Back to: Top of message | Previous page | Main SAS-L page