Server Software Reference

Overview

This section details SAS Data Surveyor for Clickstream Data Server Software functionality that you can use during clickstream rules processing. You can also use it in other places within a clickstream job where custom code might be desired.

ClickModifyParms

Function: ClickModifyParms( action, var, parmlist, delim1, delim2 );
Purpose: Modifies the parameters of a string by either dropping or keeping the specified clickstream parameters in the string. The edited string is returned. The following function is intended to be called from within a DATA step, on the right side of the = sign.
Parameters:
action
The action to take when a parmlist value is matched. Valid values are 'DROP' and 'KEEP' (with the quotes), indicating whether the values specified should be removed or kept, respectively. If action is not a recognized string, then the action defaults to 'DROP'. This value is not case sensitive.
var
The DATA step variable containing the parameters to parse.
parmlist
The space-delimited set of parameter names to search for in var. This value is not case sensitive.
delim1
The level 1 delimiter, which separates name value pairs. For example, & is standard in a query string.
delim2
The level 2 delimiter, which separates the name and value. For example, = is standard in a query string).
Returns: Returns the modified string.
Example:
      * Example which drops s1, s3, and s4 parameters.;
      * To keep only s1, s3, and s4 parameters, change DROP to KEEP in the call to;
      * ClickModifyParms();
    
        data _null_;
              attrib qs length=$300;
    
              qs='s0=0&a=1&b=2&c=3&d=4&S1=1&S2=2&S3=3&e=5&S4=4&RTC=123&f=6&s100=5'
              thelist='s1 s3 s4';
    
              put "Original Query String:";
              put qs=;
              put "Parm List " thelist ":";
              qs=ClickModifyParms('DROP',qs,thelist, '&', '=');
              put "Modified Query String:";
              put qs=;
    
        run;