Date: Wed, 3 May 2000 15:02:29 -0400
Reply-To: "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject: Re: initializing a variable
Content-Type: text/plain; charset="iso-8859-1"
> From: RHODESD1 [mailto:RHODESD1@WESTAT.COM]
> I used to know the answer to this--
> I am modifying a program that sets up an edit mask to track
> which edits were
> applied to an observation. It was originally character 13 ,
> but additional
> edits have been added so its now 22;
> In older versions of SAS (or maybe it was SPSS) there was a
> way to initialize it
> to 22 '0's by saying something like editlog='0'X 22 ; anyone
> know what I'm
> talking about? I don't want to have to go thru the program
> (about 10 pages in
> lineprinter font) and try to see if its '000000000' or '00000000000'
I think you want the repeat function
Var = repeat('0',N);
the string returned is N+1 * <string>;
you want 13 zeros:
Var = repeat('0',12);
Ron Fehd the string-processing maven CDC Atlanta GA USA RJF2@cdc.gov
---> cheerful provider of UNTESTED SAS code!*! <---
|