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 (May 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 17 May 1999 08:34:03 EDT
Reply-To:     Jamstat@AOL.COM
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Jamstat@AOL.COM
Subject:      Interleaving data sets and deleting observations
Content-Type: text/plain; charset="us-ascii"

Hi SAS-L'ers,

I have a problem that I don't know quite how to handle. I have two large SAS data sets (over a 5 million records each). The first data set has previous months data. The second data set has the current months transactions. Both data sets are sorted by an account number and date of the tranaction. The problem I am having is that I need to combine the two data sets but if the current data set has a transaction type of CLSD then all of transactions for that account that are older get deleted.

CURRENT

ACCT DATE TYPE VAR4-VAR67 2 990401 CHRG ..... 2 990411 BILL 2 990415 PAID 2 990420 CHRG 3 990402 CHRG 3 990403 CHRG 3 990422 PAID 4 990415 OPEN 4 990422 CHRG 5 990411 PAID 5 990412 CLSD 6 990401 BILL 6 990411 CHRG 6 990412 PAID 6 990413 CLSD 6 990422 OPEN 6 990423 CHRG 7 990402 OPEN

PREVIOUS

ACCT DATE TYPE VAR4-VAR67 1 990101 OPEN .... 1 990115 CHRG 1 990201 BILL 1 990301 BILL 2 990301 OPEN 3 990303 OPEN 3 990315 CHRG 3 990322 BILL 5 990311 OPEN 5 990322 CHRG 6 990311 OPEN 6 990330 CHRG

RESULT

ACCT DATE TYPE VAR4-VAR67 1 990101 OPEN .... 1 990115 CHRG 1 990201 BILL 1 990301 BILL 2 990301 OPEN 2 990401 CHRG 2 990411 BILL 2 990415 PAID 3 990303 OPEN 3 990315 CHRG 3 990322 BILL 3 990402 CHRG 3 990403 CHRG 3 990422 PAID 4 990415 OPEN 4 990422 CHRG 6 990422 OPEN 6 990423 CHRG 7 990402 OPEN

Because there are so many transactions, I need to make this as efficient as possible. I'm using SAS 6.09 MVS and the datasets are all on tape. I figured out how to do it with2 passes off each data set but I would like to do this in fewer passes. Any suggestions would be greatly appreciated.

Thanks in advance, Jarrie


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