I have 12 reports to generate in plain text format. (I already have a set of 12 PDF, 12 RTF, and 12 XLS.) Here's a working code that I was able to get a reasonable output: /* TABLE 1 TXT ******************************************************************************* */
options nodate orientation = landscape pageno = 1
topmargin = 0.4in bottommargin = 0.4in
leftmargin = 0.4in rightmargin = 0.4in;
ods listing close;
ods escapechar = '^';
title1 h=8pt j=l f='Courier New';
footnote h=8pt j=l f='Courier New';
proc report data = output_table_1 nowd ls = 155 list headskip headline style = monospace nocenter
style(report) = {fontfamily='Courier New' font_size = 8pt}
style(header) = {fontfamily='Courier New' font_size = 8pt}
style(column) = {fontfamily='Courier New' font_size = 8pt}
style(lines) = {fontfamily='Courier New' font_size = 8pt};
columns eof newtxttable
titlesp ("_Not seasonally adjusted_" sea_mov otmccnsa)
("_Seasonally adjusted_" otmccS sig_chg);
define eof / display noprint;
define newtxttable / order noprint;
define titlesp / "Industry /" display left format = $87. WIDTH = 71 STYLE(COLUMN) = {JUST = L ASIS = ON};
define sea_mov / "/ Normal/seasonal/movements" format = 8.1 WIDTH = 15 STYLE(COLUMN) = {JUST = D};
define otmccnsa / "Change from/&MMMYYpm. to/&MMMYYc." format = 8.1 WIDTH = 15 STYLE(COLUMN) = {JUST = D};
define otmccS / "Change from/&MMMYYpm. to/&MMMYYc." format = $8. WIDTH = 13 STYLE(COLUMN) = {JUST = D};
define sig_chg / "1-month/minimum/significant/change" format = 8.1 WIDTH = 13 STYLE(COLUMN) = {JUST = D};
break after newtxttable / page;
compute before _page_ / style = {just = LEFT fontfamily='Courier New' font_size = 8pt};
line @1 "TABLE 1: Employment: normal seasonal movements, over-the-month changes, and tests of significance (in thousands)";
line " ";
endcomp;
compute after _page_ / style = {just = LEFT fontfamily='Courier New' font_size = 8pt};
length text0 text1 text2 text3 text4 text5
otext1 otext2 otext3 otext4 otext5 $134.
len0 len1 len2 len3 len4 len5
olen1 olen2 olen3 olen4 olen5 8.;
text1 = "* Passed test of significance. Significant over-the-month changes are calculated at a 90 percent confidence level. The standard error";
len1 = 133;
text2 = "is used for a 1-month change. Estimated over-the-month change passes test of significance if change is greater than minimum";
len2 = 123;
text3 = "significant change. The variance for total nonfarm is an approximation because government and rail transportation are not based on a";
len3 = 132;
text4 = "probability sample. Federal government and rail transportation are essentially full population counts and do not contribute to";
len4 = 126;
text5 = "variance. State and Local government variances were approximated by extrapolating from the variances for similar size industries.";
len5 = 129;
text0 = "See footnote at end of table.";
len0 = 29;
if (eof = 0) then do;
otext1 = text0;
olen1 = len0;
otext2 = " ";
olen2 = 0;
otext3 = " ";
olen3 = 0;
otext4 = " ";
olen4 = 0;
otext5 = " ";
olen5 = 0;
end;
else if (eof = 1) then do;
otext1 = text1;
olen1 = len1;
otext2 = text2;
olen2 = len2;
otext3 = text3;
olen3 = len3;
otext4 = text4;
olen4 = len4;
otext5 = text5;
olen5 = len5;
end;
line " ";
line @1 otext1 $varying. olen1;
line @1 otext2 $varying. olen2;
line @1 otext3 $varying. olen3;
line @1 otext4 $varying. olen4;
line @1 otext5 $varying. olen5;
endcomp;
run;
ods listing close;
title;
footnote;
/************************************************************************************* TABLE 1 */ Textual output - I had to fudge the number to 9999's and showing only 1 line of the output for illustration purpose: TABLE 1: Employment: normal seasonal movements, over-the-month changes, and tests of significance (in thousands)
____Not seasonally adjusted_____ ____Seasonally adjusted_____
1-month
Normal Change from Change from minimum
seasonal Dec. 2016 to Dec. 2016 to significant
Industry movements Jan. 2017 Jan. 2017 change
---------------------------------------------------------------------------------------------------------------------------------------
Total nonfarm -9999.0 -9999.0 999.0* 999.0 This is the PDF output:
... View more