继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

SAS Macro Space

乌然娅措
关注TA
已关注
手记 64
粉丝 22
获赞 12

MaSAS Day 25: Marco Space Trick

Background:

Last time, we did a little summary of the Space Function in SAS.
Generally, it is enough, however, what if we want to manipulate the space inside a Macro?
the general space function such as Trim, Compress, Compbl*, Strip* would NOT work sometime.

[caption id=“attachment_1710” align=“alignnone” width=“500”]image

Daria-Yakovleva / Pixabay[/caption]

Problem:

We want to remove the extra empty space in the PDF output table format

image

Solution:

Because of the “N” is written in a macro. so we will use

%qcmpres or %trim

column="Total~ (N=%qcmpres(&N))~ n(%)// width= 40 left ";
column="Total~ (N=%trim(&N))~ n(%)// width= 40 left ";

Output:

image

Now we have the desired neat output!

Thanks very much to Sun Jian and CJ told me the trick!

Happy Practicing! 😝

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP