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”]
Daria-Yakovleva / Pixabay[/caption]
Problem:
We want to remove the extra empty space in the PDF output table format
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:
Now we have the desired neat output!
Thanks very much to Sun Jian and CJ told me the trick!
Happy Practicing! 😝
點擊查看更多內容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦