BookmarkSubscribeRSS Feed
jasonDMNK
Calcite | Level 5
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;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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
jasonDMNK
Calcite | Level 5
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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1224 views
  • 0 likes
  • 2 in conversation