Learning SAS? Welcome to the exclusive online community for all SAS learners.

Re: sas macro to open web browser

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Re: sas macro to open web browser

This is the errror message I got.

 

56 options noxsync noxwait;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXSYNC.
 
56 ! options noxsync noxwait;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXWAIT.
 
ERROR: Shell escape is not valid in this SAS session.
57 x 'dir '
 

My understanding is the sas version 'SAS university' is built in a way running sas on a unix evironment that is on top of window. This version doesn't allow SAS pass operation system commands to OS.


Accepted Solutions
Solution
‎01-26-2017 12:49 PM
Super User
Posts: 10,460

Re: sas macro to open web browser

I don't know if it available for UE but Proc HTTP can be used to access some web pages as is the Filename with URL to read external pages.

View solution in original post


All Replies
Super User
Posts: 6,927

Re: sas macro to open web browser

Well, if you had revealed that you use SAS UE, I could have given you the right answer immediately: this is not possible, as UE does not run on your desktop, but in a virtual machine on top of it that has no connection other than the SAS Studio port and the shared folder.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 5

sas macro to open web browser

Hello,

 

I know there is a sas macro that can call the default web browser in my computer to open a web link. The usage of the macro is some something like, %<mico name>( <web link>). I used it before. But I cannot remember the macro name. Can someone help me on this?

 

Thanks very much in advance.

 

Tienan

Super User
Posts: 6,927

Re: sas macro to open web browser

Depends on your setup. In a client/server environment, you can't open local programs, as the SAS code is executed on another computer.

Otherwise, something simple as

x 'start http://google.com';

will do the trick.

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 6,927

Re: sas macro to open web browser

PS you might want to use

options noxsync noxwait;
---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎01-26-2017 12:49 PM
Super User
Posts: 10,460

Re: sas macro to open web browser

I don't know if it available for UE but Proc HTTP can be used to access some web pages as is the Filename with URL to read external pages.

Occasional Contributor
Posts: 5

Re: sas macro to open web browser

Thank you very much. Looks like I cannot do what I was able to do what I
want to do in UE.


- Please type your reply above this line. Simple formatting, no
attachments. -##
Occasional Contributor
Posts: 5

Re: sas macro to open web browser

Thank you very much. Looks like I cannot do what I was able to do what I
want to do in UE.


- Please type your reply above this line. Simple formatting, no
attachments. -##
Occasional Contributor
Posts: 5

Re: sas macro to open web browser

Hello ballardw,

 

Thanks for your response.

 

After reading info related to proc HTTP in SAS website, I don't think I fully understand what proc HTTP. What I understand is that I can use proc HTTP to save some info as a URL and read those info by using filename  <name>  url ' ' to read it.

 

Here is my question. Do you think I use SAS to invoke browser on my computer to read the info I created by proc HTTP post method?

 

Thanks for your help inadvance

 

 

 

Super User
Posts: 6,927

Re: sas macro to open web browser

PS I moved the post to the Analytics U forum.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 17,737

Re: sas macro to open web browser


widtxz wrote:
 


My understanding is the sas version 'SAS university' is built in a way running sas on a unix evironment that is on top of window. This version doesn't allow SAS pass operation system commands to OS.


Correct. You cannot pass commands to the Unix virtual machine or to your desktop. This is a good thing for software you're downloading from the internet Smiley Happy.

Also, SAS isn't well designed for scraping web data. There are other tools that are more efficient at this process. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 10 replies
  • 415 views
  • 1 like
  • 4 in conversation