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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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