<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Session Variable Dropped in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214325#M4659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif;"&gt;It is a session variable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif;"&gt;If you use &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; background: white;"&gt;%let rc=%sysfunc(stpsrv_session(create));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; background: white;"&gt;And place save_ in front of a variable it is a session variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2015 14:16:52 GMT</pubDate>
    <dc:creator>DavidPhillips2</dc:creator>
    <dc:date>2015-07-01T14:16:52Z</dc:date>
    <item>
      <title>Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214323#M4657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%let rc=%sysfunc(stpsrv_session(create));&lt;/P&gt;&lt;P&gt;%Global save_insightsView;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;I have a Web URL portlet displaying a SAS stored process.&amp;nbsp; When the user clicks the refresh button the session variables are kept.&amp;nbsp; When the user clicks the link with this code&amp;nbsp; the variable save_insightsView&lt;/SPAN&gt; is dropped.&amp;nbsp; Any idea on why it is dropped or how I can keep the variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUT "&amp;lt;a href=&amp;amp;SERVER/"@;&lt;/P&gt;&lt;P&gt;PUT "SASPortal/Director?_directive="@;&lt;/P&gt;&lt;P&gt;PUT "STPRun&amp;amp;_action=execute%nrstr(&amp;amp;_program)=%SYSFUNC(URLENCODE(&amp;amp;_PROGRAM))&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;gt;&lt;/SPAN&gt;"@;&lt;/P&gt;&lt;P&gt;link text&amp;lt;/a&amp;gt;";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;I tried this too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;PUT "&amp;lt;a href=&amp;amp;SERVER/"@;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;PUT "SASPortal/Director?_directive="@;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;PUT "STPRun&amp;amp;_action=execute%nrstr(&amp;amp;_program)=%SYSFUNC(URLENCODE(&amp;amp;_PROGRAM))"@;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;PUT "%nrstr(&amp;amp;save_insightsView)=&amp;amp;save_insightsView)&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;gt;&lt;/SPAN&gt;"@;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;PUT "link text&amp;lt;/a&amp;gt;";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 21:18:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214323#M4657</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-06-25T21:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214324#M4658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is &amp;amp;save_insightsView a local macro variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 19:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214324#M4658</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2015-06-30T19:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214325#M4659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif;"&gt;It is a session variable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif;"&gt;If you use &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; background: white;"&gt;%let rc=%sysfunc(stpsrv_session(create));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; background: white;"&gt;And place save_ in front of a variable it is a session variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214325#M4659</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-07-01T14:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214326#M4660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did a crazy work around where I used the session variable when I was not sending to Excel and used another variable when sending to Excel.&amp;nbsp; It seems that when the page reloaded and used the content type of Excel that my session variables were not accessed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 18:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214326#M4660</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-07-01T18:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214327#M4661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;I have similar requirements. I need to pass user selection from one stored process to another STP. I am using session to achieve that.&lt;/P&gt;&lt;P&gt;In the first STP, user select term(eg. Fall2013). Here is the code I use.&lt;/P&gt;&lt;P&gt;%global save_term;&lt;/P&gt;&lt;P&gt;%let rc = %sysfunc(stpsrv_session(create));&lt;/P&gt;&lt;P&gt;%let save_term=whatever user selects;&lt;/P&gt;&lt;P&gt;Now, my question is, how you retrieve the value of save_term in second STP?.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 14:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214327#M4661</guid>
      <dc:creator>Lokraj</dc:creator>
      <dc:date>2015-08-03T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214328#M4662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;Lokraj,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;With some of the session stuff I just used what works, theoretically a session variable should be open from one stored process to another if SAS properly coded it as session, but I found a lot of bugs with session programming.&amp;nbsp; Even though I used sessions for one thing, if it didn’t work as expected I used a work around for another.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;You could try appending to the URL like.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: purple; background: white;"&gt;"&amp;lt;a href=&amp;amp;SERVER/"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: purple; background: white;"&gt;"SASPortal/Director?_directive="&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: purple; background: white;"&gt;"STPRun&amp;amp;_action=execute%nrstr(&amp;amp;_program)=%SYSFUNC(URLENCODE(&amp;amp;_PROGRAM))"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: purple; background: white;"&gt;"%nrstr(&amp;amp;FORMAT=EXCEL)%nrstr(&amp;amp;currentPageName=)&amp;amp;save_insightsView"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;Then using the variable sent in the URL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;A third option that I found I had to use sometimes was invisible textboxes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; color: black; background: white;"&gt;I have about four posts on these where I asked questions about similar items and posted the solution for the exact issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 13:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214328#M4662</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-08-04T13:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Session Variable Dropped</title>
      <link>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214329#M4663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you David,&lt;/P&gt;&lt;P&gt;Your answer will help me decided which option is suitable for my scenario.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 21:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Session-Variable-Dropped/m-p/214329#M4663</guid>
      <dc:creator>Lokraj</dc:creator>
      <dc:date>2015-08-04T21:16:28Z</dc:date>
    </item>
  </channel>
</rss>

