BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Boriana
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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;

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

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

Boriana
Obsidian | Level 7

I have SAS version 9.4. The code suggested by you returned the same error.

Rick_SAS
SAS Super FREQ

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;

Boriana
Obsidian | Level 7
For Base SAS Software ...
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
Rick_SAS
SAS Super FREQ

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.

 

Boriana
Obsidian | Level 7

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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2047 views
  • 4 likes
  • 2 in conversation