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 (March 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 8 Mar 1999 16:27:53 -0500
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
Subject:      Re: <no subject>
Comments: To: Gary Tiedens <gtiedens@NJCMAIL.UPS.COM>
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.....

Gary E Tiedens United Parcel Service

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