f



Re: How to search list of particular text values into free text #2

Sorry, there was a minor error, b.types should be b.category:

proc sql;
create table xx as
select distinct a.srno,a.order_details,
max(case when a.order_details contains trim(b.types) then b.category
else '' end) as btype
from large_table a, smalltable b
group by a.srno
order by a.srno
;

proc print;
run;

Srno  Order_details                   btype

 1    The order of Mangos ..          Type_1
 10   Retured all Potatoes..          Type_2
 2    The returned order ..           Type_1
 3    Order for the Oranges ..        Type_1
 4    new container for the Onions .. Type_2
 5    Boxes of Grapes received ..     Type_1
 6    Almonds boxes received ..       Type_3
 7    Dry fruits received on ..       Type_4
 8    Spinach were tossed out ..      Type_2
 9    Begs of Potatoes ..             Type_2

On Tue, 19 Jun 2007 00:27:45 -0400, Ya Huang <ya.huang@AMYLIN.COM> wrote:

>This one may not be efficient when look up table are big,
>but at least it saves your typing:
>
>proc sql;
>create table xx as
>select distinct a.srno,a.order_details,
>max(case when a.order_details contains trim(b.types) then b.types else ''
>end) as btype
>from large_table a, smalltable b
>group by a.srno
>order by a.srno
>;
>
>proc print;
>run;
>
>Srno Order_details                           btype
>
> 1   The order of Mangos ..                  Mangos
> 10  Retured all Potatoes ..                 Potatoes
> 2   The returned order ..                   Mangos
> 3   Order for the Oranges ..                Oranges
> 4   new container for the Onions ..         Onions
> 5   Boxes of Grapes received ..             Grapes
> 6   Almonds boxes received ..               Almonds
> 7   Dry fruits received on last ..          Dry fruits
> 8   Spinach were tossed out ..              Spinach
> 9   Begs of Potatoes received ..            Potatoes
>
>
>On Mon, 18 Jun 2007 13:29:55 -0400, SUBSCRIBE SAS-Nim Pat
><Npp1129@GMAIL.COM> wrote:
>
>>On Mon, 18 Jun 2007 12:02:45 -0400, SUBSCRIBE SAS-Nim Pat
>><Npp1129@GMAIL.COM> wrote:
>>
>>>Hi All,
>>>Please if anyone has idea about how to search particular list of text
>>>values from one small table to free text variable in large dataset and
>>>when finds the value, update the large dataset.
>>>I have small lookup table (around 120 records) for example:
>>>Category   Types;
>>>
>>>Type_1 Mangos,
>>>Type_1 Pineapples,
>>>Type_2 Onions,
>>>Type_2 Tomatoes,
>>>…
>>>
>>>Type_n typeN.
>>>
>>>
>>>Now I need to search each particular text values (variable-Types) from
the
>>>above small table into my large dataset which has free text variable
>>>called “Order_details”.
>>>For example:
>>>Order_details: The last order was for the Mangos on Nov 11 2006.
>>>
>>>
>>>I’m using following code but it’s not efficient:
>>>PROC SQL;
>>>Create table new_Main_Table AS
>>>SELECT *,
>>>Case
>>>when Order_details contains (‘Mangos’) then “Type_1”
>>>when Order_details contains (‘Pineapples’) then “Type_1”
>>>when Order_details contains (‘Onions’) then “Type_2”
>>>when Order_details contains (‘Tomatoes’) then “Type_2”
>>>.
>>>.
>>>.
>>>when Order_details contains (‘typeN’) then “Type_n”
>>>Else “ “
>>>End As order_Types
>>>From Main_table ;
>>>Quit;
>>>Run;
>>>
>>>Thanks for your time and help,
>>>I really appreciate your effort,
>>>Nim
>>
>>Guys Sorry for the Inconveniencies. I'm attaching sample table.
>>my Small lookup table:
>>Data SmallTAble ;
>>Length Category Types $ 25 ;
>>Input Category Types;
>>Cards ;
>>Type_1 Mangos
>>Type_1 Oranges
>>Type_1 Pineapples
>>Type_1 Peaches
>>Type_1 Pears
>>Type_1 Kiwis
>>Type_1 Grapes
>>Type_2 Onions
>>Type_2 Tomatoes
>>Type_2 Carrots
>>Type_2 Carrots
>>Type_2 Celery
>>Type_2 Potatoes
>>Type_2 Spinach
>>Type_3 Almonds
>>Type_3 Cashews
>>Type_4 Dry fruits
>>;
>>
>>And My LARGE Table with Free Text variable :
>>
>>Data Large_table ;
>>Length Srno $4 Order_details $400 ;
>>Input Srno  Order_details ;
>>Cards ;
>>
>>1 The order of Mangos dispatched on Nov. 11 2006
>>2 The returned order received from the customer for Mangos was on
>>Dec. 12 2006
>>3  Order for the Oranges dispatched on Nov. 26 2006
>>4 new container for the Onions received from NJ on Dec. 1 2006
>>5 Boxes of Grapes received from FL on Dec 2007
>>6 Almonds boxes received from IL on Nov. 2006
>>7 Dry fruits received on last month were dispatched to NJ on dec.
>>2006
>>8 Spinach were tossed out from the store on Nov. 2006
>>9 Begs of Potatoes received from FL on Nov. 2006
>>10 Retured all Potatoes to company on Dec 2006
>>
>>Thanks,
>>Nim Pat
0
ya.huang (1962)
6/19/2007 4:32:15 AM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
696 Views

Similar Articles

[PageSpeed] 31

Reply:

Similar Artilces:

Re: How to search list of particular text values into free text
On Mon, 18 Jun 2007 12:02:45 -0400, SUBSCRIBE SAS-Nim Pat <Npp1129@GMAIL.COM> wrote: >Hi All, >Please if anyone has idea about how to search particular list of text >values from one small table to free text variable in large dataset and >when finds the value, update the large dataset. >I have small lookup table (around 120 records) for example: >Category Types; > >Type_1 Mangos, >Type_1 Pineapples, >Type_2 Onions, >Type_2 Tomatoes, >… > >Type_n typeN. > > >Now I need to search each particular text values (variable-Types) from the >above small table into my large dataset which has free text variable >called “Order_details”. >For example: >Order_details: The last order was for the Mangos on Nov 11 2006. > > >I’m using following code but it’s not efficient: >PROC SQL; >Create table new_Main_Table AS >SELECT *, >Case >when Order_details contains (‘Mangos’) then “Type_1” >when Order_details contains (‘Pineapples’) then “Type_1” >when Order_details contains (‘Onions’) then “Type_2” >when Order_details contains (‘Tomatoes’) then “Type_2” >. >. >. >when Order_details contains (‘typeN’) then “Type_n” >Else “ “ >End As order_Types >From Main_table ; >Quit; >Run; > >Thanks for your time and help, >I really appreciate your effort, >Nim Guys Sorry for the Inconveniencies. I'm attaching sample table. my Small lookup table: Data SmallTAble ; Le...

Re: How to search list of particular text values into free text #3
This one may not be efficient when look up table are big, but at least it saves your typing: proc sql; create table xx as select distinct a.srno,a.order_details, max(case when a.order_details contains trim(b.types) then b.types else '' end) as btype from large_table a, smalltable b group by a.srno order by a.srno ; proc print; run; Srno Order_details btype 1 The order of Mangos .. Mangos 10 Retured all Potatoes .. Potatoes 2 The returned order .. Mangos 3 Order for the Oranges .. Oranges 4 new container for the Onions .. Onions 5 Boxes of Grapes received .. Grapes 6 Almonds boxes received .. Almonds 7 Dry fruits received on last .. Dry fruits 8 Spinach were tossed out .. Spinach 9 Begs of Potatoes received .. Potatoes On Mon, 18 Jun 2007 13:29:55 -0400, SUBSCRIBE SAS-Nim Pat <Npp1129@GMAIL.COM> wrote: >On Mon, 18 Jun 2007 12:02:45 -0400, SUBSCRIBE SAS-Nim Pat ><Npp1129@GMAIL.COM> wrote: > >>Hi All, >>Please if anyone has idea about how to search particular list of text >>values from one small table to free text variable in large dataset and >>when finds the value, update the large dataset. >>I have small lookup table (around 120 records) for example: >>Category Types; >> >>Type_1 Mangos, >>Type_1 Pine...

How to search list of particular text values into free text
Hi All, Please if anyone has idea about how to search particular list of text values from one small table to free text variable in large dataset and when finds the value, update the large dataset. I have small lookup table (around 120 records) for example: Category Types; Type_1 Mangos, Type_1 Pineapples, Type_2 Onions, Type_2 Tomatoes, … Type_n typeN. Now I need to search each particular text values (variable-Types) from the above small table into my large dataset which has free text variable called “Order_details”. For example: Order_details: The last order was for the Mangos on Nov 11...

Re: Searching for partial text in character variables in SAS #2
There are also the PERL regular expression functions. But you will have to wait for the late sleeping "regEXperts" to wake up and load up on caffeine. ...

Re: Can I use SAS to search and replace a piece of text in, say, #2
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of toby989@HOTPOP.COM > Sent: Monday, November 05, 2007 12:54 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Can I use SAS to search and replace a piece of text > in, say, 1000 text files? > > How can I use SAS to search and replace a piece of text in, > say, 1000 text > files? Thanks for letting me know. > > Toby > > Toby, You need to give us a little more to work with. Where are the text files stored? In a single directory or scattered about? Do the file names have a pattern to them, e.g. they all begin (or end) with the same characters? By text files do you mean ascii files with standard CR/LF line terminators or something else? If you write back to SAS-L with some additional details I'm the list can help you out. Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 Nordlund, Dan (DSHS/RDA) wrote: >> -----Original Message----- >> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On >> Behalf Of toby989@HOTPOP.COM >> Sent: Monday, November 05, 2007 12:54 PM >> To: SAS-L@LISTSERV.UGA.EDU >> Subject: Can I use SAS to search and replace a piece of text >> in, say, 1000 text files? >> >> How can I use SAS to search and replace a piece of text in, >> say, 1000 text >> files? Thank...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Re: SAS Text Editor #2
Hi Dan, Thanks for the reply. I too use Textpad but I don't know how to how to set it up so that it can highlight for the SAS syntax. How to configure it for the SAS extension syntax. Thanks Cherish "Nordlund, Dan (DSHS/RDA)" <NordlDJ@dshs.wa.gov> wrote: > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of cherish k > Sent: Monday, April 28, 2008 10:43 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: SAS Text Editor > > Can somebody direct me to a good SAS text editor for Windows. > Basically I need for just syntax highlighting (I don't need > an editor with prompts etc). > > Thanks > Cherish > > Cherish, If all you need is syntax highliting, I would recommend Textpad (what I use on a regular basis) or UltraEdit (an excellent editor). I am sure others will soon list their favorites. Hope this is helpful, Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 --------------------------------- Save all your chat conversations. Find them online. ...

Re: SAS text miner #2
hi ... I'm in the same boat as Gerhard in that I do not use text miner ... however, this is a similar problem to ones that I have dealt with in both name and address matching using data steps (NOTE: all done prior to the availability of the PRX functions in SAS my first concern was to clean (standardize) the data sets, for example in your 'limited' example, it's easy to write a set of statements to allow you to match observations (see below) ... some general rules are: either upcase or lowcase the text; use compress to get rid of non-text characters such as hyphens, periods, ext.; use the tranwrd function to standardize the appearance of common words (in this case 'limited', with address matching it could be to convert 'avenue' to 'ave', 'street' to 'st', etc. the above is no different than what goes on within geocoding software that matches addresses to lat/longs ... the first step within that software is to standardize all your addresses so they have common names (ST, AVE, BLVD, etc.) to match a stored reference database so, whether it's cleaning a data set so you can match observations within the data or so you can match multiple data sets to each other, you can do it with SAS functions or you can get the DataFlux software this is poker, when to hold 'em (your time is less important than your $$$, write your own code), when to fold 'em (your $$$ is less important than your time, get DataFlux) a coup...

Re: SAS/AF
Wrapping works if you have the justification set to left and do not display the horizontal scroll bar. Kind regards, Rob Workman -----Original Message----- From: RH Savanur [mailto:r_savanur@YAHOO.COM] Sent: Friday, September 17, 2004 9:08 AM To: SAS-L@LISTSERV.UGA.EDU Subject: SAS/AF - How to enable text wrapping in Text pad..? Hi, Is there any facility for automatic text wrapping for "TEXTPAD" component..? Thanks in advance. Regards, Savanur ===================================================================== This message contains confidential information intended only fo...

Re: How to delete a text file in SAS #2
If you would like to use SAS to delete the text file, and keep the code platform-neutral, you can use the FILENAME and FDELETE functions in a data step, macro, or SCL. SCL also offers the DELETE function which is simpler to use than FDELETE, because it doesn't require a FILEREF. %* Use macro to delete external file c:\temp\test.txt; %let rc=%sysfunc(filename(myRef,c:\temp\test.sas)); %let sysrc=%sysfunc(fdelete(&myRef)); * Use data step to delete test.txt in WORK library; data _null_; fileRef="ext2del"; extFile=catx('\',pathname('work'),'test.txt'); rc=filename(fileRef,extFile); if rc=0 and fexist(fileRef) then rc=fdelete(fileRef); rc=filename(fileRef); run; * Use SCL with FILENAME and FDELETE functions to delete test.txt in WORK library; fileRef="ext2del"; extFile=catx('\',pathname('work'),'test.txt'); rc=filename(fileRef,extFile); if rc=0 and fexist(fileRef) then rc=fdelete(fileRef); rc=filename(fileRef); * Use SCL with DELETE function to delete c:\temp\test.txt; sysrc=delete('c:\temp\test.txt','file); -Randy -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of SUBSCRIBE SAS-L Tom Smith Sent: Friday, January 25, 2008 1:34 PM To: SAS-L@LISTSERV.UGA.EDU Subject: How to delete a text file in SAS I can not use proc datasets and delete statement to delete a text file in a SAS library. Then how can I do it? any s...

Re: Question on the SAS Text Miner #2
JEarley@LMU.EDU wrote: >Hi All --- a colleague of mine is investigating text mining as a method >of acquiring data. > > > >Does anyone: > > > >1. Have any comments on the SAS Text Miner ( does it even exist --- >and if so, how expensive) It exists. As for cost, if you have to ask, you can't afford it. (University costs are likely to be significantly lower.) >2. Are there any text-mining programs that anyone would recommend. There are a *ton* of them. I personally like Perl as a text ripper and parser. But that's just me. There are so many out there that there may already be one that works on the context your colleague is interested in. Check Google and Wikipedia.. and then duck as the results pour in. GATE and YALE are both open-source text mining apps. I'm sure there are more. >We thank you very much for any info. > > > > > >Joe Earley See you in October, Joe! David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330 _________________________________________________________________ A place for moms to take a break! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us ...

Re: Text Date To SAS Date? #2
The YMDdttm informat may be what you want. 1328 data _null_; 1329 y = 'yyyy-mm-dd'; 1330 y = '2007-10-31'; 1331 dt = input(y,ymddttm.); 1332 format dt datetime20.; 1333 put (_all_)(=); 1334 run; y=2007-10-31 dt=31OCT2007:00:00:00 Notice the TIME part is 0 which may or may not be useful for you. On 10/31/07, Jonathan Wolgamuth <jonwolgamuth@gmail.com> wrote: > I've looked around quite a bit and am finding that this question comes up > quite a bit, however, I'm flummoxed on how to get it to work on a field I'm > working with. > > Basically, the field (eff_dt) is a 10 character text field in this format. > yyyy-mm-dd > > I need to convert this field to a DATETIME20. field so I can compare it to > another field that is already set to that format. > > Should I parse out the existing column using the substring function and > concatenate it together into something more recognizeable for SAS? > > Any pointers would be greatly appreciated. > > -- > jon > ...

Nonmember submission: Re: [cpan #4055] (text instead of -text in gedi #2
Guest via RT <bug-Tk@rt.cpan.org> writes: >This message about Tk was sent to you by guest <> via rt.cpan.org > >Full context and any attached attachments can be found at: ><URL: https://rt.cpan.org/Ticket/Display.html?id=4055 > > >In Tk804.025_beta1.tar.gz >text is used in place of -text all over the place in gedi My proposed fix is to delete gedi. -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

RE: [SPAM] - Re: [SPAM] - Re: Serialize wxList - Found word(s) list error in the Text body
Hi Jorgen your approach is modelled along the MFC serialization idea, the approach = I mentioned is based on the XTI metadata provided for an object. So the = streaming itself is not coded anymore, but the metadata for a new class = is. The streaming process now iterates over the attributes, processes = callbacks that avoid streaming out undesired attributes (eg x and y in a = sizer dialog), suppresses default values etc. This also means that the = streaming in survives missing attributes, as long as they are either not = mandatory params for ::Create or have a default value. B...

Can I use SAS to search and replace a piece of text in, say, 1000 text files?
How can I use SAS to search and replace a piece of text in, say, 1000 text files? Thanks for letting me know. Toby ...

Re: Changing from Text to Value for a bunch of variables #2
I assume you want to produce stats with those 0's and 1's... I would do something like the following (tested). You'll still create = new variables but you could easily pout them in a new dataset : proc format; invalue Answer "Yes" =3D 1 "YES" =3D 1 "yes" =3D 1 "No " =3D 0 "NO " =3D 0 "no " =3D 0 " " =3D . other =3D .; run; data MyCurrentDataset; var1 =3D &qu...

Re: SAS Enterprise Miner and Text Miner #2
Jared, That is correct. Text Miner is currently NOT a separate product but part of Enterprise Miner. I am having problems getting our Management to evaluate Text Miner because we would need to get Enterprise Miner and that carries a BIG price tag. In addition, My management is concerned with the IP we have built thus far and concerned our IP could used against us when trying to work out stuff with SAS Tech Support. So, I do not have any hands on experience with SAS Text Miner - The demos I saw at Orlando 2007 were quite interesting and promising for our needs but I believe there is NOT a single product that will do everything you hope for with regards to Text Mining. Regards, Charles Patridge ...

Re: Search algorithm to link columns of text #2
On Sat, 12 Apr 2008 07:00:26 -0700, bblunck@HOTMAIL.COM wrote: >Dear experts, > >I have a nasty and unavoidable problem with linking two databases of >1) corporate accounting and 2) corporate event data: I have no common >identifier! > >Therefore, I need to construct an algorithm that matches the records >of the two databases as effectively as possible. Given the lack of >duplicate variables, it seems that matching on company name is my only >bet. > >Simple? No such luck! For whatever reason, there can be several >distinctions in the way a corporation's name is listed, the most >obvious complication being that of non-English lettering (i.e �, �, � >etc.), which furthermore is often translated to English lettering in >various ways (for instance, '�' = 'oe' or 'o') > >As I see it then, I need to match each corporate event record with a >column of company names in the accounting database in a way that takes >into consideration the several potential variations of the names due >to translation of country-specific lettering, punctuation, >abbreviations etc. So what I need is some sort of matching algorithm >that creates a 'score' of potential matches and finds the most >appropriate one. And from my first glances at the data, it looks like >it may have to be a quite sophisticated one. > >So at the very least, I need a SAS code that can search sub-strings of >text....

Re: Conversion of a text variable into a SAS date #2
This code should work... sasdt=mdy(substr(chardate,6,2)*1,substr(chardate,9,2)*1,substr(chardate,1,4)*1); You can use the format 'mmddyy10.' to print a couple values of 'sasdt' to verify. Satindra. On Mon, Jul 14, 2008 at 8:41 AM, Basile Chaix <chaix@u444.jussieu.fr> wrote: > Dear colleagues, > I have a text variable of the following format: "YYYY-MM-DD" (the > year, the month and the day with "-" between them), e.g., > "2001-02-26". > Would there be a simple SAS code to translate that into a SAS date? > Kind regards, > Basile > On Monday, July 14, 2008 at 11:24:41 AM UTC-5, Satindra Chakravorty wrote: > This code should work... >=20 > sasdt=3Dmdy(substr(chardate,6,2)*1,substr(chardate,9,2)*1,substr(chardate= ,1,4)*1); >=20 > You can use the format 'mmddyy10.' to print a couple values of > 'sasdt' to verify. >=20 > Satindra. >=20 So I was googling trying to get a solution for my SAS date issue - my progr= amming is a little rusty and I stumbled on this chain. And I end up findin= g code from you from 7-8 years ago! Hope everything is going well with you= .. And thanks for the code - worked perfectly! -Lysbet =20 ...

Re: Left Justify a value in text export. #2
You will need to format it to LEFT justify. So the line should read as: @232 IndexFee $3. -L The capitalization of the letter L is for emphasis only. You can specify it in the lower case, but it is difficult to say whether it is the number 1 or the letter l when you debug code. Note that this will generate a warning because you are trying to LEFT align a numeric variable. Venky Chakravarthy On Wed, 22 Mar 2006 07:06:07 -0800, The_Grudge <BarberD@GMAIL.COM> wrote: >I have the following code. My question is easy. Given the variable >"IndexFee" as liste...

Re: Searching for partial text in character variables in SAS
Rieza The INDEX function should work for you: INDEX (src,str) first position of string str located in string src In your case a statement such as If INDEX( notes , 'INSUR' ) then ... where notes is the name of the variable and INSUR is the string that you are seeking. I left blank the outcome of the statement but most likely would want to select only these records so you would write If INDEX( notes , 'INSUR' ); You don't really care what the position of the string is other than you want a value other than zero which would mean that the string was not found. You may want to convert the notes file to either upper or lower case -- ie, notes = upcase(notes ); -- in order to simplify the search. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Rieza Soelaeman <rsoelaeman@GMAIL .COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Searching for partial text in character variables in SAS 10/16/2008 10:55 AM Please respond ...

Re: Saving values in a format in text form #2
Aha! I should have known there was an infinitely easier way to do this. I had noticed those options in some papers I'd downloaded, but didn't put two and two together. Thank you. Svend > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Data _null_; > Sent: Tuesday, February 09, 2010 2:27 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Saving values in a format in text form > > Have a look at the control data set created by the option CNTLOUT= > > proc format > library = DEVDATA7.formats CNTL...