stallingOne
stallingOne

Reputation: 4006

How do you prevent SAS stored process to show the log when users add _debug=log in the url

When you run a SAS Stored Process (STP) with some url parameters

https://xxx.xxx.xxx/xxx?_program=yyy/yyy&aaa=aaa

anyone can see the log by adding _debug=log in the url parameters.

Is there a way to prevent that possibility?

I would like to hide the log from my users.
(Not only when errors occur, for that cf. http://support.sas.com/kb/16/225.html)

EDIT: I forgot to specify that I'm looking for a solution that would not impact other STP's, only one.

Upvotes: 1

Views: 1345

Answers (2)

Krusaderjake
Krusaderjake

Reputation: 504

If you're using SAS Enterprise Guide these are the steps that I went through to reject showing the SAS Log running the stp on the web:

1) Right Click to modify the stored process

2) Go into "prompts" and create a new prompt

3) Set the first tab values to this:

Instead of Edit you'll be creating new

4) In the second tab, select prompt type of "variable"

5) Click to check the default value box and leave the default value blank

define your _debug variable

Now when a user tries to run the stored process from the web with &_debug=log they should see an error not allowing them to:

error

Upvotes: 3

DomPazz
DomPazz

Reputation: 12465

Easiest way would be to put a PROC PRINTTO in your autoexec.sas. That way the log is redirected from streaming to the client to where ever you specify. Just make sure you have unique file names for the logs or you can get into trouble with 2 STPs trying to write to the same file.

Upvotes: 1

Related Questions