LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Oct 2005 17:21:38 -0700
Reply-To:     oseithedude@GMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         oseithedude@GMAIL.COM
Organization: http://groups.google.com
Subject:      How to call another program within a program in SAS???
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

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


Back to: Top of message | Previous page | Main SAS-L page