BookmarkSubscribeRSS Feed
Quartz | Level 8

Hi Folks,

I would like to understand , how can I call html file through STP, I am trying to convert/replicate SAS/IntrNet UI by STP.

There are many HTML files are there, and inside master index.html file, many sub html call is happening. 

Please suggest.

Barite | Level 11

You can stream web files using STPs so long as you set the http headers, eg using a macro similar to this one:


In general though it's not a recommended approach.  You will have the overhead of a SAS session for every asset (html, css, js files etc) plus the challenge of writing code to deal with situations such as very wide lines of text, binary files (images), different encodings etc.


You would be far better off just using a web server to serve your web content, and calling your SAS services as needed using JS.  If you don't have SAS 9 EBI, or SAS Viya, you could try out SASjs Server as an alternative:


The advantage of following the SASjs Server approach is that (so long as you use the SASjs framework) you will be able to easily migrate to Viya at a later date.


SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
Quartz | Level 8

I would look to PROC STREAM.


proc stream outfile = _webout prescol ;BEGIN

/* any HTML like: */

%include "&yourpath.\yourfile.html" ;


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
  • 1 like
  • 3 in conversation