Converts a text file into a HTML File
%txt2html(txtfile=file-name,
repname=report name,
path=new html path,
titleby=html title variable,
linkon=footnote hyperlinks,
pubweb=publish to web);
Where |
Is Type... |
And represents... |
file-name |
C |
The external text file. Specifies the full path of the file along
with filename. For example (c:\mypath\myfile.txt). |
report name |
C (optional) |
The report name which was defined in the reports dataset. An example
name would be (adv). |
report |
LIBNAME |
Library referencing the location of the reports dataset. |
path |
C (optional) |
The physical file path where the new html file is to be created. |
titleby |
C (optional) |
html title from specified variable in REPORT dataset. |
footnote hyperlinks |
C (optional) |
The option to add hypertext linking of footnotes to
programs and data sources.
|
publish to web |
C (optional) |
Publish to the the html file to the web server. This is
in addition to creating the output to the default report ouput location.
|
Details
txt2html converts a text file produced from SAS and creates a HTML file. If
the report name parameter is specified then the HTML file will be created onto the web
server with the same directory structure as the analysis program structure. If this
structure has not been created on the webserver, please contact the administrator and have
this done before using this tool.
If the txtfile parameter is specified then an output file will be created in the same
directory with a new html extension (.html). A second copy will also be created with
the corresponding path on the webserver.
The new HTML file will have a different extension (.html) while retaining the same file
name. Although viewing the file from a web browser does not reveal page breaks, page
breaks should be maintained when it is printed*.
The txt2html tool requires that a SAS report file be defined in the report dataset.
This is where it determines where the file is located and the proper page
size. For more information on the report dataset,
click here.
The path parameter is optional. If this is not specified, the destination will be
on the web server with the same directory path as the analysis programs.
The titleby parameter is optional. If this is not specified, the report
description variable (repdesc) will be chosen as the default title variable. Valid values for this field include:
'repname','repdesc','progname','order','header1',
'header2','header3','header4','title1',
'title2','title3','title4','title5','title6',
'title7','title8','footer1','footer2','footer3',
'footer4','footer5','footer6','footer7',
'footer8','footer9','footer10'
The footnote hyperlinks will generate links for both programs and datasets if 'yes' was
specified. If data is the only items needed for hyperlinks, the 'data' option can be
used.
The footnote links to data will always link to the transport version of the data.
This will alter the display of your footnote as well. For example, your log
may be converted from:
generated: 30nov99:16:34 by: mciraulo data: enroll.sd2
to
generated: 30nov99:16:34 by: mciraulo data: enroll.xpt
Example
%txt2html(repname=l_demog);
%txt2html(repname=l_demog, path=c:\myproj\htmlfiles\);
%txt2html(repname=l_demog, titleby=title2);
BUG Note
*Page break during printing does not work for IE
5.+. Netscape browsers and IE 4 seem to work. |