Desktop productivity for business analysts and programmers

Text output opens as HTML When Stored Process is executed

Reply
Frequent Contributor
Posts: 97

Text output opens as HTML When Stored Process is executed

Hi

I am using a List data task in EG to generate a report with results as Text. So it uses proc print. I create a Stored Process out of the EG project. But when I execute the Stored Process through EG or through StoredProcess web application the output comes as HTML

I want to see text out put only from the browser as well.
SAS Super FREQ
Posts: 8,720

Re: Text output opens as HTML When Stored Process is executed

Hi:
This really is a question for Tech Support. Every client application in the Enterprise Intelligence Platform "knows" which kind of content (HTML or SASReport) it is best able to receive. Listing or TEXT output is not the default for any of the Enterprise Intelligence client applications.

When you use the Stored Process Wizard to make your stored process, EG sets up the stored process so that the result type is flexible -- every client app will get the content it wants. If you really want to override the content-type/output type so you return ASCII text files to a web browser, Tech Support can help you reset the content-type header using the STPSRV_HEADER function. However, there is still no guarantee that the output, as it comes from the server, will look exactly the same as your Text file in EG or your output in the LISTING window.

For more information about how to contact Tech Support, refer to:
http://support.sas.com/techsup/contact/index.html

cynthia
Frequent Contributor
Posts: 97

Re: Text output opens as HTML When Stored Process is executed

Cynthia

Where do I specify the Content type as text/plain

Where should I write the code
SAS Super FREQ
Posts: 8,720

Re: Text output opens as HTML When Stored Process is executed

Hi:
You really need to contact Tech Support for help. The reason is that EG, when you use the Stored Process Wizard, uses a special set of macro calls to %STPBEGIN and %STPEND in order to do all the setup for the client applications.

Sometimes, you can use STPSRV_HEADER with %STPBEGIN and then sometimes you have to switch to an alternative to %STPBEGIN and write to _WEBOUT directly. I do not know which scenario your stored process will fall into. And, even if you CAN get it working, I do not know whether the output will be what you want.

When I was working on the stored process course a while back, I tested the creation of an ASCII text file and although I could make the browser launch Notepad to open my results, the Notepad default font of Arial was used and my output looked nothing like I expected it to look. At that point, I didn't even bother to save my code.

Some previous examples of using STPSRV_HEADER have been posted to the forum.
http://support.sas.com/forums/thread.jspa?messageID=6638᧮
http://support.sas.com/forums/thread.jspa?messageID=3244ಬ

Even so, I highly recommend that you contact Tech Support for further help. This is not a trivial bit of code and if the output does NOT look the way you want, then you will need more help from Tech Support to get that piece working.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 86 views
  • 0 likes
  • 2 in conversation