Date: Thu, 22 Sep 2011 20:22:40 +0000
Reply-To: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Subject: Re: Open code %sysfunc IFC
In-Reply-To: <CACT-pRyWv-dc8Y8MR++Yq+J1GTe9WaF35YMvfG2Yhey8v3BXxQ@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Richard:
use %nrstr
http://www.sascommunity.org/wiki/Conditionally_Executing_Global_Statements
Ron Fehd Know-Rescan-String maven
> -----Original Message-----
> From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-
> l@listserv.uga.edu] On Behalf Of Richard DeVenezia
> Sent: Thursday, September 22, 2011 1:17 PM
> To: SAS-L
> Subject: Open code %sysfunc IFC
>
> Is there a setting I can use to make the data step in the %str appears
> in the log ?
>
>
> %let drop=;
>
> data class;
> set sashelp.class end=end;
>
> if end then do;
> * if funky logic then;
> call symput ('drop', 'weight');
> end;
> run;
>
> %sysfunc(
> ifc ( %length(&drop)
> , %str(
> data class;
> set class (drop=&drop.);
> run;
> )
> , %str ()
> )
> );
>
>
> Thanks,
> Richard
|