Date: Tue, 28 Mar 2006 16:25:00 -0800
Reply-To: lzhang9830@YAHOO.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lei Zhang <lzhang9830@YAHOO.COM>
Organization: http://groups.google.com
Subject: Re: How to create a "%picture" macro?
In-Reply-To: <7367b4e20603280547m53521a47me64ba5f961b34ef1@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I am looking for a macro that can work with both VAR and VAL.
More examples of usages are showed below:
%let x1 = 12.3;
%let x2 = 23;
%let x3 = 45.3;
%picture(&x1 &x2 &x3, fmt= Output three values: xx.x xx, and xx.x)
== > Output three values: 12.3 23, and 45.3
%picture(&x1 &x2 &x3, fmt= Output estimated value and CI: xx.x
[xx,xx.x] ) == > Output estimated value and CI: 12.3 [23,45.3]
The output formats for the macro are various and unlimited.
Either data step or pure macro code can be used for the
implementation.
I am not against using REGEX (regular expression functions) to
parsing the &fmt if there is no other better solution with basic macro
string functions.
LZ