Date: Mon, 8 Mar 1999 16:27:53 -0500
Reply-To: GORRELP1 <GORRELP1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: GORRELP1 <GORRELP1@WESTAT.COM>
Subject: Re: <no subject>
Content-Type: text/plain; charset=US-ASCII
Here's one way:
64 data one;
65 input var1 $12.;
66 put var1=;
67 datalines;
VAR1=xyzspflogaaa
VAR1=xvbvjgfngkff
VAR1=spflogkhkhkf
VAR1=tetetespflog
VAR1=ghjgkgkgkgkg
VAR1=ytytytspflog
NOTE: The data set WORK.ONE has 6 observations and 1 variables.
NOTE: The DATA statement used 0.05 seconds.
74 ;
75 run;
76
77 data two;
78 set one;
79 where index(var1, 'spflog') ne 0;
80 run;
NOTE: The data set WORK.TWO has 4 observations and 1 variables.
NOTE: The DATA statement used 0.05 seconds.
81
82 data _NULL_;
83 set two;
84 put var1;
85 run;
xyzspflogaaa
spflogkhkhkf
tetetespflog
ytytytspflog
NOTE: The DATA statement used 0.05 seconds.
____________________Reply Separator____________________
Subject: <no subject>
Author: Gary Tiedens <gtiedens@NJCMAIL.UPS.COM>
Date: 3/8/99 3:41 PM
Hello all,
I have a dataset with over 600,000 observations in it. I am trying to extract
only those obs. that have the word spflog in it.
I tried the scan function and the result that I received were not what I wanted,
I also tried substr. Any ideas.....
xxx.xxxx.spflog.xxx
xxx.spflog.xxx.xxxx
Gary E Tiedens
United Parcel Service