Does the PMT function included in the SAS Analytics Pro?
I receive an error when use in data step:
ERROR 68-185: The function PMT is unknown, or cannot be accessed
The PMT function was introduced in SAS 9.3, so it should be available in Base SAS in a correctly installed 9.4 session.
Could you paste the log from running the following?
proc product_status; run;
Please show your code and tell us your SAS Version. For example:
%put &=SYSVLONG;
data _null_;
/* The payment for a $5,000 loan earning a 12% nominal annual interest rate, that is to be paid back in five monthly payments */
P1 = PMT(.01/12, 5, 5000);
put P1=;
P = FINANCE("PMT",.01/12, 5, 5000);
put P=;
run;
prints the following in the SAS log:
13 %put &=SYSVLONG;
SYSVLONG=9.04.01M5P091317
14
15 data _null_;
16 /* The payment for a $5,000 loan earning a 12% nominal annual
16 ! interest rate, that is to be paid back in five monthly payments */
17 P1 = PMT(.01/12, 5, 5000);
18 put P1=;
19 P = FINANCE("PMT",.01/12, 5, 5000);
20 put P=;
21 run;
P1=1002.5013883
P=-1002.501388
I have SAS version 9.4. The code suggested by you returned the same error.
The PMT function was introduced in SAS 9.3, so it should be available in Base SAS in a correctly installed 9.4 session.
Could you paste the log from running the following?
proc product_status; run;
Since you do not have ETS installed you need to use the FINANCE function with first argument of 'PMT', as shown in my example. The FINANCE function should work for you.
When you said "The code suggested by you returned the same error" I assumed that you got errors for both calls. I now suspect that the FINANCE call succeeded. In the future, please paste the log, as I requested.
It worked! Thank you very much for your answer! I did not check the log for the FINANCE function. It did not return an error. I apologize for not pasting the log as requested. I will be more considerate next time. Sorry again!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.