BookmarkSubscribeRSS Feed
Calcite | Level 5

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}

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

put '{/html}';

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

...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:
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.

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.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation