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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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