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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Oct 2008 14:11:43 -0400
Reply-To:     Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject:      Re: NewBie Question - array's and using the index function
Comments: To: Michael Walker <mwalker@KALAHARI.NET>
In-Reply-To:  A<200810231627.m9NAkq3H015958@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Michael,

I think we need some more information. Could you show the log from your example and describe why it is not working how you think it should. Also, it seems you have provided sample values of REFERRER_QUERY_STRING, but could you also provide the values for the array variables (Q QUERY KEYWORD)?

Jack

Jack Clark Senior Research Analyst phone: 410-455-6256 fax: 410-455-6850 jclark@hilltop.umbc.edu

University of Maryland, Baltimore County Sondheim Hall, 3rd Floor 1000 Hilltop Circle Baltimore, MD 21250

Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Michael Walker Sent: Thursday, October 23, 2008 12:28 PM To: SAS-L@LISTSERV.UGA.EDU Subject: NewBie Question - array's and using the index function

Hi all,

I have a quick newbie question with my base sas code I have written that doesn't seem to be doing its thing - what am I doing wrong. i basically have a whole lot of query strings from search engines - each one uses different name pairs that contain the search string that the searcher typed in, which I want to catch and write away

e.g strings look like this rlz=1C1GGLS_enZA291&sourceid=chrome&ie=UTF-8&q=test and rlz=1C1GGLS_enZA291&sourceid=chrome&ie=UTF-8&query=test33 and rlz=1C1GGLS_enZA291&sourceid=chrome&ie=UTF-8&keyword=testingme

So here is what i have written just to evaluate if my logic works which it doesn't seem to be... Please help

tempRefQString = lowcase(URLDecode(Referrer_Query_String)); /* Store's the URL's in a var*/

ARRAY KeyWordsPosArray (3) q query keyword; /* Array of the various CGI name value pairs I need to look for in theURL*/ do i = 1 to 3 ; if index(tempRefQString, KeyWordsPosArray(i)) gt 0 then do; KN_ReferrerExternalSearchWord = 'Y';

/* If any of the array values are in the query string then mark as Y KN_ReferrerExternalSearchWord - so that I know they are being picked up I will do further string manipulations*/ end; end;

Thanks in advance Michael


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