Hi Anand,
smpwservicescgi.exe is deprecated.
Newer agent version uses smpwservices.fcc.
$$USERMSG$$, $$USERNAME$$, $$USERINFO$$ variables are custom variables. Which is not default provided by siteminder. However smpwservices.fcc can be customized per client requirement.
There are hidden variables defined in fcc file itself, such as
document.write("<INPUT type='hidden' name='USERNAME' value='$$username$$'>");
Or
<INPUT type='hidden' name='SMTOKEN' value='$$smtoken$$'>
<INPUT type='hidden' name='smagentname' value='$$smagentname$$'>
<INPUT type='hidden' name='smauthreason' value='$$smauthreason$$'>
<INPUT type='hidden' name='postpreservationdata' value='$$postpreservationdata$$'>
<INPUT type='hidden' name='target' value='$$target$$'>
<INPUT type='hidden' name='smquerydata' value='$$smquerydata$$'>
What needs to be done is modifying the file to add your custom variables in and ensure data is passed along during redirect. You may be able to also add variable dump using java script to see what is available at this step. After all, smpwservices.fcc is just a web page.
One thing worth to mention is that newer agent support language localization out of box (forms_en-US, forms_es-ES, forms_de_DE, etc.), thus there could be multiple copy of smpwservices.fcc, you will need find the correct location. Or set "Localization" ACO parameter to no, then it will go to older version form location.
Hope this helps.
Hongxu