Hi SSP Experts!
I have a problem with the following code. formattest.HTML looks great, but when I put the same code in SAS it doesnt produce the same output?.
I have attached formattest.html, html output and SAS output.
Can anyone tell me whats the problem with the below code?!
%let stpname=XXX;
data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file print;
put infile;
cards4;
<FORM ACTION="&URL" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="_program" VALUE="&stpname"/>
<INPUT TYPE="HIDDEN" NAME="_action" VALUE="EXECUTE"/>
<style type="text/css">
#mystyle {
border:10px solid black;
border-collapse:collapse;
background-color: #CCCCCC;
font-family: "Calibri";
}
#mystyle th {
border:1px solid black;
font-weight: bold;
}
#mystyle th.th1 {
text-align: left;
width: 200px;
}
#mystyle th.rightside {
border:0px;
width: 250px;
}
#mystyle td {
border:1px solid black;
}
#mystyle td.off {
border:0px;
}
input[type=text] {
width: 100px;
background-color: #FFFFFF;
}
</style>
<table id="mystyle">
<tr> <th class="th1">FLIGHT</th>
<th>4TH QTR</th>
<th>1ST QTR</th>
<th>2ND QTR</th>
<th>3RD QTR</th>
<td class="rightside"> </td>
</tr>
<tr> <td class="off"> </td>
<td><input type="text" name="4qStart1" >-<input type="text" name="4qEnd1" ></td>
<td><input type="text" name="1qStart1" >-<input type="text" name="1qEnd1" ></td>
<td><input type="text" name="2qStart1" >-<input type="text" name="2qEnd1" ></td>
<td><input type="text" name="3qStart1" >-<input type="text" name="3qEnd1" ></td>
<td class="off"> </td>
</tr>
<tr> <td class="off"> </td>
<td><input type="text" name="4qStart2" >-<input type="text" name="4qEnd2" ></td>
<td><input type="text" name="1qStart2" >-<input type="text" name="1qEnd2" ></td>
<td><input type="text" name="2qStart2" >-<input type="text" name="2qEnd2" ></td>
<td><input type="text" name="3qStart2" >-<input type="text" name="3qEnd2" ></td>
<td class="off"> </td>
</tr>
<tr> <td class="off"> </td>
<td><input type="text" name="4qStart3" >-<input type="text" name="4qEnd3" ></td>
<td><input type="text" name="1qStart3" >-<input type="text" name="1qEnd3" ></td>
<td><input type="text" name="2qStart3" >-<input type="text" name="2qEnd3" ></td>
<td><input type="text" name="3qStart3" >-<input type="text" name="3qEnd3" ></td>
<td class="off"> </td>
</tr>
</table>
</FORM>
;;;;
run;
SGB
Have you tried specifying an output file instead of file print? Using file print uses some defaults that may not be desirable for html.
I tried using _webout as well! It is not working?!.. Any help to fix this is appreciated.
Did you try something like:
file "c:\path\output.html";
When I used that output it sure looked a lot like your HTML output in the PDF.
Hi ,
You can try this
data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;
<HTML > code;
;;;;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.