全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3158 2
2014-02-27
想用proc template修改结果输出格式,但是总是出错。如下:

170  proc template;
171  define style mystyle;
172  parent = Styles.RTF;
173  replace fonts /
174  'TitleFont' = ("Times Roman",13pt,Bold) /* Titles from TITLE statements */
175  'TitleFont2' = ("Times Roman",12pt,Bold Italic) /* Procedure titles ("The _____
176  Procedure")*/
177  'StrongFont' = ("Times Roman",10pt,Bold)
178  'EmphasisFont' = ("Times Roman",10pt,Italic)
179  'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
180  'headingFont' = ("Times Roman",10pt) /* Table column and row headings */
181  'docFont' = ("Times Roman",10pt) /* Data in table cells */
182  'footFont' = ("Times Roman",10pt) /* Footnotes from FOOTNOTE statements */
183  'FixedEmphasisFont' = ("Courier",9pt,Italic)
184  'FixedStrongFont' = ("Courier",9pt,Bold)
185  'FixedHeadingFont' = ("Courier",9pt,Bold)
186  'BatchFixedFont' = ("Courier",6.7pt)
187  'FixedFont' = ("Courier",9pt);
188  replace color_list /
189  'link' = blue /* links */
190  'bgH' = white /* row and column header background */
191  'fg' = black /* text color */
192  'bg' = white; /* page background color */;
193  replace Body from Document /
194  bottommargin = 0.25in
195  topmargin = 0.25in
196  rightmargin = 0.25in
197  leftmargin = 0.25in;
198  replace Table from Output /
199  frame = hsides /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
200  rules = groups /* internal borders: none, all, cols, rows, groups */
201  cellpadding = 5pt /* the space between table cell contents and the cell border */
202  cellspacing = 0pt /* the space between table cells, allows background to show */
203  borderwidth = 0.5pt /* the width of the borders and rules */;
204  style SystemFooter from SystemFooter /
205  font = fonts("footFont");
206  end;
ERROR: Template 'Mystyle' was unable to write to template store!
207  run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
      real time           0.06 seconds
      cpu time            0.04 seconds
WARNING: Errors were produced.
NOTE: The SAS System stopped processing this step because of errors.

208  proc template;
209  define style Styles.Custom;
210  parent = Styles.RTF;
211  replace fonts /
212  'TitleFont' = ("Times Roman",13pt,Bold) /* Titles from TITLE statements */
213  'TitleFont2' = ("Times Roman",12pt,Bold Italic) /* Procedure titles ("The _____
214  Procedure")*/
215  'StrongFont' = ("Times Roman",10pt,Bold)
216  'EmphasisFont' = ("Times Roman",10pt,Italic)
217  'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
218  'headingFont' = ("Times Roman",10pt) /* Table column and row headings */
219  'docFont' = ("Times Roman",10pt) /* Data in table cells */
220  'footFont' = ("Times Roman",10pt) /* Footnotes from FOOTNOTE statements */
221  'FixedEmphasisFont' = ("Courier",9pt,Italic)
222  'FixedStrongFont' = ("Courier",9pt,Bold)
223  'FixedHeadingFont' = ("Courier",9pt,Bold)
224  'BatchFixedFont' = ("Courier",6.7pt)
225  'FixedFont' = ("Courier",9pt);
226  replace color_list /
227  'link' = blue /* links */
228  'bgH' = white /* row and column header background */
229  'fg' = black /* text color */
230  'bg' = white; /* page background color */;
231  replace Body from Document /
232  bottommargin = 0.25in
233  topmargin = 0.25in
234  rightmargin = 0.25in
235  leftmargin = 0.25in;
236  replace Table from Output /
237  frame = hsides /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
238  rules = groups /* internal borders: none, all, cols, rows, groups */
239  cellpadding = 5pt /* the space between table cell contents and the cell border */
240  cellspacing = 0pt /* the space between table cells, allows background to show */
241  borderwidth = 0.5pt /* the width of the borders and rules */;
242  * Leave code below this line alone ;
243  style SystemFooter from SystemFooter /
244  font = fonts("footFont");
245  end;
ERROR: Template 'Styles.Custom' was unable to write to template store!
246  run;


这是从论坛里找的,但是运行过程中总是出错,如红色字体所示。请教这是什么原因呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-2-27 19:53:42
试着在代码最前边加语句:
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-2 21:23:44
Jessup007 发表于 2014-2-27 19:53
试着在代码最前边加语句:
太好了,这回成功了。谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群