Your SAS programs, embedded in web apps and elsewhere

custom HTML - Stored process!

Reply
Contributor SGB
Contributor
Posts: 41

custom HTML - Stored process!

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

Attachment
Super User
Posts: 10,538

Re: custom HTML - Stored process!

Have you tried specifying an output file instead of file print? Using file print uses some defaults that may not be desirable for html.

Contributor SGB
Contributor
Posts: 41

Re: custom HTML - Stored process!

I tried using _webout as well! It is not working?!.. Any help to fix this is appreciated.

Super User
Posts: 10,538

Re: custom HTML - Stored process!

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.

Occasional Contributor
Posts: 5

Re: custom HTML - Stored process!

Hi ,

You can try this

data _null_;

  format infile $char256.;

  input;

  infile = resolve(_infile_);

  file _webout;

  put infile;

cards4;

<HTML >  code;

;;;;

run;


Ask a Question
Discussion stats
  • 4 replies
  • 814 views
  • 0 likes
  • 3 in conversation