Your SAS programs, embedded in web apps and elsewhere

symget('_url') returning missing value

Reply
New Contributor
Posts: 4

symget('_url') returning missing value

Hi,

I'm trying to create a simple HTML front for my stored process and all of the code works fine EXCEPT symget('_url') is returning a missing value. Can anyone tell me why? Here is a sample of my code (with <> changed to {}):

data _null_;
file _webout;

thissrv = symget('_url');
thispgm = symget('_program');

put '{br}';
put '{h1 align="center"}New SAS Report{/h1}';

put '{hr}';

put '{FORM ACTION="' thissrv +(-1) '" method=get}';

put '{input type="hidden" name="_program" value='
thispgm +(-1) '"}';
put '{input type="hidden" name=reqtype value="page1"}';

put '{br}';
put '{p}Please Select a Plan Year:
{select NAME=PlanYear}
{option}2006{/option}
{option}2007{/option}
{/select}
{/p}';

put '{input type="SUBMIT" value="Run Report"}';
put '{/form}';

put '{/html}';

run;
SAS Super FREQ
Posts: 8,864

Re: symget('_url') returning missing value

Posted in reply to jasonDMNK
Hi...this may be a question for Tech Support, as they can investigate in more detail. _URL may not be available to your stored process, depending on how you're submitting it. According to the explanation at this page
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html

...not all reserved macro variables are available from every client or on every server.

Also, attempting to write your own HTML in a DATA step program may turn out to be a separate problem. This web page:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/inet2stp.html
includes the statement that

If you are writing to _WEBOUT using PUT statements while ODS has _WEBOUT open, when you execute the code the PUT statement data might be out of sequence with the data generated by ODS. This problem occurs because both your code and ODS are opening the same fileref at the same time. For example, the following code might not always work as expected:


Refer to the above web site for more details and a workaround. Or, contact Tech Support for help with your specific problem.

cynthia
New Contributor
Posts: 4

Re: symget('_url') returning missing value

Posted in reply to Cynthia_sas
Thanks for the suggestions Cynthia, I looked at the two links and they don't sound like they apply to my situation. I have another stored process that uses the same code and works fine, and the two stored processes are deployed with the exact same options.

Also, I do not have any additional ODS statements that are writing to _WEBOUT.

I have submitted this to SAS tech support to see if they have any further suggestions, I'll update this thread if there's a resolution.

Thanks,
Jason
Ask a Question
Discussion stats
  • 2 replies
  • 231 views
  • 0 likes
  • 2 in conversation