Date: Fri, 12 Feb 1999 16:27:45 -0500
Reply-To: RHOADSM1 <RHOADSM1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: RHOADSM1 <RHOADSM1@WESTAT.COM>
Subject: Re: input data step
Content-Type: text/plain; charset=US-ASCII
Frank,
The "double-dash" variable list syntax that you are using in your INPUT
statement (SAL&M1--SAL&M12) means "I want to reference all variables between
SAL&M1 and SAL&M12 in the program data vector for the current step". Since SAS
builds a new program data vector for each step, it doesn't automatically
"remember" this sequence of variables. You would have to repeat the list in the
new step, either explicitly by listing the variables again, or implicitly by
referencing a data set that contains them. If you are using macro code in the
earlier step, you might create a global macro variable containing a list of all
the variable names (SALJAN SALFEB ...) and then use that macro variable in
subsequent steps.
Mike Rhoads
Westat
RhoadsM1@Westat.com
<<question from Frank Mwaniki (excerpt)>>
When I uncomment line 51 read all variables (that are consecutive), the
datastep does not work. However, when I spell out each variable
individually, like
below it does work! Can anybody tell me why?
Note - the "&m1" variables are created in a previous data step to identify
the "SAL"
variables by month.
44 DATA FLOW;
45 INFILE FLOW;
46 INPUT
47 @005 REGION $CHAR06.
48 @015 OUTLET $CHAR08.
49 @048 PRODUCT PD5.
51 /*@070 (SAL&M1--SAL&M12) (PD10.1)*/
52 @080 SAL&M1 PD10.1
53 @090 SAL&M2 PD10.1
;
|