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 (July 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 9 Jul 2007 02:13:54 -0700
Reply-To:   "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Subject:   Re: Importing CSV file format into Sas
In-Reply-To:   <200707090549.l693VJLU015028@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset=iso-8859-1

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of SUBSCRIBE SAS-L Anonymous > Sent: Sunday, July 08, 2007 10:50 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Importing CSV file format into Sas > > If you notice Var1 = 'A' and also = 'B'. Also Var4 is the > same in both > cases -- when Var1 = 'A' or Var1 = 'B'. So will the code > below be correct? > > If Var1 = 'A' Then Do ; > Input Var1 Var2 Var3 Var4 $ ; > End ; > Else Do ; > Input Var1 Date11. Var5 Var6 Var7 Var4 $;

Close to correct, but Toby's example requires a variable Var8 I believe, in order to line up the variables properly, something like this

Input Var5 Date11. Var6 Var7 Var8 $ Var4 $;

Is Var2 on record type A supposed to be a datetime variable of some type (the first half of the value looks like a date)? I changed Var1 on the record type B branch to Var5 because Var1 is used for reading the record type.

> *in this case Var1 > = 'B' and> Var 4 is the same when Var1 = A and also Var1 = B; ; > End ; > > Cards; > A,200606016672059,1,ABC > A,200606010004552,1,DEF > B,01-JUN-2006,97073,92001,IQ,ABC > ; >

Hope this is helpful,

Dan

Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204


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