View Single Post
  #1 (permalink)  
Old 10-27-2005, 12:21 AM
oseithedude@gmail.com
Guest
 
Posts: n/a
Default How to call another program within a program in SAS???

Hey, I have a SAS program that, among other things, creates a dataset
containing "bad" observations that I have no use for. There are about
2,000 of these "bad" observations in the data set but there may be
10-15 "good" observations that I want to keep in the dataset. There is
a variable in the data set called "line" and each observation has a
different "line" number. I have 2,000 "line" numbers that I have thrown
into a if... not in statement that can delete all of the 2000 "bad"
observations as follows:

data program;
set original;
if line not in ('1','456','767',etc..[2,000 numbers within this
statement].);
run;

I don't want to put the program above within the "main" program that
created the original dataset (because I don't want all 2,000 numbers
within that main program), but I do want to be able to call the program
above from the main program and have the original dataset be returned
minus the 2,000 observations with "bad" line numbers. Is it possible to
call another program within a program
like this??? Thanks in advance...

Julie

Reply With Quote