【发布时间】:2017-04-02 23:23:41
【问题描述】:
如何在日志中打印前导空格?
当我做类似的事情时
data _null_;
x = ' Hello, world!';
put x;
run;
结果是
2522 data _null_;
2523 x = ' Hello, world!';
2524 putlog x;
2525 run;
Hello, world!
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
我查看了PUT documentation,但没有什么特别突出的。似乎使用$CHARw. 之类的格式可能会起作用。但是,这需要提前知道字符串的长度。
我希望日志输出如下所示:
Hello, world! (<--edited by hand to display leading spaces)
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
【问题讨论】:
标签: sas