- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have SAS version 9.4. The code suggested by you returned the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Custom version information: 9.4_M1
Image version information: 9.04.01M1P120413
For SAS/STAT ...
Custom version information: 13.1
For SAS/GRAPH ...
Custom version information: 9.4_M1
For SAS/IML ...
Custom version information: 13.1
For High Performance Suite ...
Custom version information: 2.2
Image version information: 9.04.01M0P022614
For SAS/ACCESS Interface to ODBC ...
Custom version information: 9.4_M1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!