楼主: 6203479170
8259 5

几个关于使用DATA _NULL_输出的问题 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

97%

还不是VIP/贵宾

-

威望
0
论坛币
90 个
通用积分
2.7600
学术水平
2 点
热心指数
7 点
信用等级
2 点
经验
292 点
帖子
125
精华
0
在线时间
219 小时
注册时间
2009-8-2
最后登录
2025-9-8

楼主
6203479170 发表于 2010-10-4 14:08:58 |AI写论文
20论坛币
ods pdf file='e:\temp.pdf';
%let ls=130;
%let ps=60;
option mprint pageno=1 nodate ls=&ls ps=&ps FORMCHAR="|_---|+|---+=|-/\<>*"  ;
%global LINE BLANK;
data _null_;
call symput('LINE',repeat('-',&ls));
call symput('BLANK',repeat(' ',&ls));
run;
title1 "&blank";
title2 'SAS' ;
footnote1 'The Power To Know';
footnote2 "&blank";
data _null_;
file print titles linesleft = ll pagesize =&ps linesize = &ls;
put
"SAS"/
"&line"/
"Statistical Analysis System"/
"&blank"/
"SPSS"/
"&line"/
"Statistical Product and Service Solutions"/
"&blank"/;
run;
ods pdf close;

大家先运行一下一上的代码。
1.我设置输出的linesize的数值已经和我建立的横线宏变量数值是对应的,为什么横线还是超出了?
2.如何把title靠左?
3.怎样改变内容的字体?
(1)我想把PUT语句里的内容的字体变成'Arial',
(2)'SAS'和'SPSS'字体变大加粗,对应的那行加上阴影
(3)"Statistical Analysis System"与"Statistical Product and Service Solutions"改成红色字体。

各位大侠帮帮忙~感激不尽

关键词:Data null Statistical statistica statistic Data 输出 null

沙发
xiaosanmao 发表于 2010-10-4 15:03:39
data _null_;
call symput('LINE',repeat('-',&ls-1));
call symput('BLANK',repeat(' ',&ls-1));
run;

藤椅
novice505 发表于 2010-10-4 20:22:20
问题1:repeat函数的作用是再重复n次。
REPEAT(argument,n)  n must be greater than or equal to 0
所以你的linesize实际上是131,当然会超出一个。
问题2:title居左
title2 justify=left 'SAS';
详细信息参考帮助文档,楼下继续。。。

板凳
6203479170 发表于 2010-10-5 12:13:15
顶一下。。大家帮帮忙。。

报纸
bullstag 发表于 2010-10-6 01:03:46
proc template + (proc report or proc tabulate) maybe easier.

地板
6203479170 发表于 2010-10-6 09:12:09
5# bullstag maybe you're right,well,i just want to figure out if there is any possible for data _null_ process

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 09:45