LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 Jun 2004 01:06:57 -0400
Reply-To:     Talbot Michael Katz <topkatz@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Talbot Michael Katz <topkatz@MSN.COM>
Subject:      %SYSFUNC and PUT function


I wanted to create integer macro variables of equal length, using the Zw.d format, e.g., 0001, 0002, 0003,...

I figured I would do something like: %let v = %sysfunc(put(&i.,Z4.));

To my shock and dismay, this didn't work. I got the following message: ERROR: The PUT function referenced in the %SYSFUNC or %QSYSFUNC macro function is not found.

Well, I was able to use the following clunky work-around: %let l = %length(&i.); %if &l. < 4 %then %let v = %sysfunc(repeat(0,3 - &l.))&i.; %else %let v = &i.;

But what gives with sysfunc and put? Bug or feature?

-- TMK --

Back to: Top of message | Previous page | Main SAS-L page