Help using Base SAS procedures

proc format?

Reply
N/A
Posts: 0

proc format?

HI I have two tables. wonder if i can use proc format or any other SAS programming to achieve the following:

Table #1
Effective Date Rate
20100601 2.5
20090525 2.25
20090302 2.0

Table #2 (has 10,000 records)
Customer LendingDate
A 20090701
B 20090701
..

Basically what i want to do is use the rate Table #1 as reference table to add new column "rate" to customer Table #2. For example
If customer's lending date is 20100622 , then the rate will be 2.5
If customer's lending date is 20100401 , then the rate will be 2.0

My challenge is the table #1 could be growing and I will not be the one update the table. How can i get it done ?
Super Contributor
Super Contributor
Posts: 3,174

Re: proc format?

Posted in reply to deleted_user
A PROC FORMAT (possibly using CNTLIN= to load from a SAS file) is a reasonable and efficient approach for known, discrete (or range-defined) value mapping (START-END to LABEL using SAS PROC FORMAT terms).

You mention about how can I get it done - presuming you mean to define the association data values, you can load from a SAS member which can be created from external source. Presumption is that someone, somewhere knows what's supposed to be used for this process, correct?

Scott Barry
SBBWorks, Inc.


Suggested Google advanced search argument, this topic / post:

proc format documentation cntlin site:sas.com Message was edited by: sbb
Ask a Question
Discussion stats
  • 1 reply
  • 106 views
  • 0 likes
  • 2 in conversation