Explanation : Writes the beginning of the HTML page (header and title) directly to the web output stream (_webout).
Copied!
data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;
<html>
<head>
<body>
<center>
<br><br>
<h1>SAS PROC PRINT OF SASHELP.CARS</h1>
</center>
<br>
</body>
</html>
;;;;
run;
1
DATA _null_;
2
FORMATINFILE $char256.;
3
INPUT;
4
INFILE = resolve(_infile_);
5
file _webout;
6
put INFILE;
7
cards4;
8
9
10
11
12
13
SAS PROC PRINT OF SASHELP.CARS
14
15
16
17
18
;;;;
19
RUN;
2 Code Block
ODS HTML
Explanation : Activates the ODS HTML destination to _webout to include the standard PROC PRINT output (first 10 observations of SASHELP.CARS), then closes the destination to regain manual control of the stream.
Copied!
ods html file=_webout; /* This line opens the Output Delivery System to allow SAS Proc output streaming and close HTML */
options nodate nonumber;
proc print data=sashelp.cars (obs=10);
run;
ods html close; /* This line closes the Output Delivery System to end SAS Proc output streaming and resume HTML */
1
ods html file=_webout; /* This line opens the Output Delivery System to allow SAS Proc output streaming and close HTML */
2
3
options nodate nonumber;
4
5
PROC PRINTDATA=sashelp.cars (obs=10);
6
RUN;
7
8
9
ods html close; /* This line closes the Output Delivery System to end SAS Proc output streaming and resume HTML */
3 Code Block
DATA STEP
Explanation : Writes the continuation and end of the HTML code (button and closing tags) to the web output stream.
Copied!
data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;
<html>
<head>
<body>
<center>
<br><br>
<button type="button" onclick="alert('Hello world!')">Update Table</button>
</center>
<br>
</body>
</html>
;;;;
run;
1
DATA _null_;
2
FORMATINFILE $char256.;
3
INPUT;
4
INFILE = resolve(_infile_);
5
file _webout;
6
put INFILE;
7
cards4;
8
9
10
11
12
13
14
15
16
17
18
;;;;
19
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.