LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Frank Mwaniki <frank.mwaniki@PHARMA.NOVARTIS.COM>
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 ;


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