ListingWidth=80
MessageWrap=No
ErrmsgOverride=No
But for more control over how users see listing reports after a program run, a programmer may want to output listing results in a different format.
Attached is a very simple program of a batch program that outputs an HTML file and then opens the file with Internet Explorer after the program run. This code could be made more robust by putting the HTML output statements in functions, like: beginParagraph, endParagraph, writeMessage, etc. Thought the program is very basic, it shows how, with external file write operations, a programmer can design more sophisticated listing reports.
PROC GLOBAL
file html;
PROC CREATEHTML_FF
preproc
filewrite(html,"<html><head><title>CSPro Output</title>");
postproc
filewrite(html,"</html>");
close(html);
execsystem(maketext('%s\Internet Explorer\iexplore.exe "%s"',pathname(ProgramFiles64),filename(html)));
PROC CREATEHTML_QUEST
preproc
filewrite(html,"<p><strong>Questionnaire %d</strong><br />",CREATEHTML_ID);
postproc
filewrite(html,"</p>");
PROC VALUE
filewrite(html,"Value is %d<br />",VALUE);
file html;
PROC CREATEHTML_FF
preproc
filewrite(html,"<html><head><title>CSPro Output</title>");
postproc
filewrite(html,"</html>");
close(html);
execsystem(maketext('%s\Internet Explorer\iexplore.exe "%s"',pathname(ProgramFiles64),filename(html)));
PROC CREATEHTML_QUEST
preproc
filewrite(html,"<p><strong>Questionnaire %d</strong><br />",CREATEHTML_ID);
postproc
filewrite(html,"</p>");
PROC VALUE
filewrite(html,"Value is %d<br />",VALUE);