Hi:
%STR is one of the SAS Macro Facility quoting functions. The relevant sections of the documentation are here:
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-overvwqt.htm
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a001061325.htm
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a001072333.htm
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a001061345.htm
What will be informative, beyond the doc, is for you to find out WHERE in your code the macro variable &CUSTSEGS is used. For example, if you search for the macro variable in your code, you might find something like this:
[pre]
if WOMBAT in (&custsegs) then do;
... more code ...
[/pre]
which would tell you that the macro variable &CUSTSEGS is used in the IF statement to supply values for the IN operator that is testing the value of the dataset variable WOMBAT. If you then did a PROC FREQ:
[pre]
proc freq data=lib.dataset;
tables WOMBAT;
run;
[/pre]
you would find out whether the values of the WOMBAT variable were correctly specified in the %LET statement inside the %STR function.
Generally speaking any of the Macro Quoting Functions, including %STR are used to mask or hide the normal syntactic meaning of certain special characters, as defined in the documentation. In this instance, I suspect that %STR was used in the %LET statement because someone felt that the single quotes or the pipe symbols needed to be "protected".
cynthia