BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
_sjm_
Calcite | Level 5

I am having difficulty using a PROC FCMP created function based on python code in IML. Is this even possible? I haven't been successful finding any online documentation/examples about this. I don't want to keep troubleshooting if this can't be done. If it can be done, can resources please be shared? Or maybe I need to take an entirely different approach. 

 

Additional details ... python code needs to stay python, that is, I know I can translate it to run in SAS but I have a lot of complex already validated python code I need to run in SAS, so this isn't feasible. Python code is based on matrix syntax, which is why I believe IML must be used for processing rather than a data step. Functions are created via the FCMC procedure using Python Language Elements. The PYTHON procedure is unavailable in my SAS environment.

 

Any and all input is much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

No, PROC FCMP is used to define functions for the DATA step and procedures that process data row-by-row. IML is a matrix language and has its own way to create and call user-defined functions. These functions can take matrices and vectors as arguments and can return the same. See

Extending IML - Defining a Function Module - The DO Loop (sas.com)

Everything you wanted to know about writing SAS/IML modules - The DO Loop

 

 

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

No, PROC FCMP is used to define functions for the DATA step and procedures that process data row-by-row. IML is a matrix language and has its own way to create and call user-defined functions. These functions can take matrices and vectors as arguments and can return the same. See

Extending IML - Defining a Function Module - The DO Loop (sas.com)

Everything you wanted to know about writing SAS/IML modules - The DO Loop

 

 

 

_sjm_
Calcite | Level 5
Thanks Rick. I will abandon this approach.

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 342 views
  • 1 like
  • 2 in conversation