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 12:27:46 -0400
Reply-To:     Michael Walker <mwalker@KALAHARI.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Walker <mwalker@KALAHARI.NET>
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