Date: Wed, 26 Mar 2008 11:41:30 -0400
Reply-To: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject: Re: if 0 then set data ...
In-Reply-To: <5f1f0200-f641-4735-8cd4-2afda1bd8cc6@h11g2000prf.googlegroups.com>
Content-Type: text/plain; charset=us-ascii
> From: bookie
> Can't find reference to this code, could somebody help explain the
> syntax and meaning pls?
as already mentioned this copies the data structure of the named data
set into the PDV.
... and this means what?
then you can add (local) variables to the data structure.
I am using this trick in my current R&D on call execute:
Data Testing;
if 0 then set &CxData.;
attrib CxStmnt length = $ 72
CxVarName length = $ 32
CxI length = 4
CxTexting length = 4;
array MvarC(*) $ 32 _character_;
array MvarN(*) 8 _numeric_;
My do loops are:
Do CxI = 1 to dim(MvarC) - 2;
*...;
end;
Do CxI = 1 to dim(MvarN) - 2;
*...;
end;
which excludes the local variables and covers the case
where the CxData data set contains either no char or no num variables.
Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov