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 (March 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 8 Mar 2011 13:50:42 +0000
Reply-To:     "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject:      Re: Payment agreement coding
Comments: To: Yingtao <yingtaoliu@GMAIL.COM>
In-Reply-To:  <218759F2-94E4-43CB-BA5A-E9003CBD29BC@gmail.com>
Content-Type: text/plain; charset="us-ascii"

Yingtao:

Given how close your words "if the payment date >= ..." are to how one would express them in SAS statements, your request looks like a homework assignment outsourced to SAS-L.

However, if you send your own code to SAS-L along with the results you obtained, you'll get a lot of diagnostic, if not prescriptive, help.

Regards, Mark

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Yingtao Sent: Tuesday, March 08, 2011 7:56 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Payment agreement coding

Account Action_DATE PAY_AMT Payment_date AGREE_to_Pay_DATE_1 AGREE_AMT_1 AGREE_to_Pay_DATE_2 AGREE_AMT_2 123 31-Oct-07 0 31-Oct-07 1-Nov-07 300.18 2-Nov-07 272 123 1-Nov-07 0 1-Nov-07 . 0

123 1-Nov-07 572.18 1-Nov-07 . 0

123 2-Nov-07 0 2-Nov-07 . 0

123 5-Nov-07 0 5-Nov-07 . 0

123 6-Nov-07 0 6-Nov-07 . 0

123 7-Nov-07 0 7-Nov-07 6-Nov-07 1700

123 7-Nov-07 0 7-Nov-07 . 0

123 7-Nov-07 1669.4 7-Nov-07 . 0

I have a dataset as follows and am trying to figure out:whether the customer keeps the agreement or not

the logic to define the customer keeps the agreement is:

1. if the payment date is >= the date the agreement made and

2. the payment date is <= agree to pay date + 7 days and

3. the payment amount is >=85%*Agreeent amount

otherwise define as the customer does not keep the agreement.

there are also some restriction:

For two agreements, agreement 1 must be kept before applying logic to agreement 2.

For multiple payment records inside agreement window, sum all Pay Amt when comparing to Agree amount

For multiple agreement records on the same account, each payment (or sum of payments) is only counted once.

Just stuck with coding this, anyone has good idea? Thanks Tao


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