BookmarkSubscribeRSS Feed
samira
Obsidian | Level 7

I want to create a simple web page that uses an AJAX call to get json type data from a SAS program and returns the data to the web page. 

 

I want to run a very simple sas stored process: 

 

proc json out=_webout;
export sashelp.class (where=(age=11)) / nokeys nosastags;
run;

 

but I got an error when I want to run this stored process, here is my log: 

 

 

Untitled.png

 

I am very new in sas. I would really be appriciated if someone helps me!

2 REPLIES 2
Shmuel
Garnet | Level 18

add at the beginnig of the code the next statement:

 

FILENAME _WEBOUT URL ' ... enter here a URL to your web file ...';

 

VasilijNevlev
Quartz | Level 8

Hi Samira,

 

_webout is a reserved filename used by stored procedure server to send the data back to web server which in turn sends it to your browser.

 

I can see you are executing your code on PC SAS. Try creating a stored procedure instead and run that stored procedure in your browser. Let me know here if you need help creating a stored procedure.

 

Regards,

Vasilij

=======================================
For more information about {An}alytium, visit https://www.analytium.co.uk

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
  • 2126 views
  • 0 likes
  • 3 in conversation