hi ... just to add one comment to what's been posted so far ...
data steps comprise two types of statements ... declarative and executable
the declarative statements take place at compile time
the executable statements take place at execution time
your statement ... if column=. then drop;
mixes two types of statements ... not allowed !!!
IF-THEN is EXECUTBLE
DROP is DECLARATIVE
take a look at ... DATA Step Statements: Executable and Declarative Statements
as for what you are really trying to do, as has been pointed out, if you want to get rid
of an observation (ROW) at execution time, that's easy ... IF-THEN-DELETE (all executable)
if you want to get rid of a variable (COLUMN) if any values of that variable are missing, that's
more difficult ... you'll have to read/write the entire data set based on finding a missing value
one possible way ... replace your 'IF-THEN-DROP' with the 'IF-THEN-DO' shown below
input x y @@;
1 2 3 . 5 6 7 8 9 10
if y eq . then do;
call execute ('data test; set test (drop=y); run;');
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
> i am trying to do something such as
> data new;
> set old;
> if column=. then drop;
> this does not work, but translates the basic concept of my goal.
> any help would be great.