Running sas2htm
These notes show how to run the tool sas2htm that ATS has
developed to make it easy to convert a SAS program into a web page. We
assume you have downloaded sas2htm.
To Run sas2htm
- Start a dos window by clicking Start then Programs then Command
Prompt).
- Change directories to the place where you .sas file is located. Say
your file is located in the c:\myfiles directory, you would type
c:
cd c:\myfiles
- Run sas2htm to convert the .sas file to a web page, a .htm
file. Say your program was called myprog.sas, you woud
type
sas2htm myprog
Debugging Problems
In a sense, the comments that you put into your program (e.g. *beginc; *endc;
*beginp; *endp; *output; ) have a kind of a syntax, and if there are errors
in that syntax, then your output (the web page) will not look as you expect
it. Here are some tips on debugging problems in using sas2htm.
- Before you run a program via sas2htm make sure that it runs
successfully in SAS. Check that there are no errors, and that it
produces the desired output.
- Common problems in using sas2htm are
- Forgetting to enclose comments in a *beginc; *endc; block.
Such comments will not be included in the web page.
- Forgetting to include a *output; after a *beginp; *endp;
block. The output from the procedures would be omitted.
- Forgetting a *endc; or a *endp; . The program will
become confused, and the screen will display a message like
############### *beginc while still in program block ###########
or
############# *beginp while still in comment block ############
This error would also be displayed in the .tmp.log file, e.g. sample1.tmp.log.