DECLARE Statement: Python Object

Declares a Python object.

Alias:DCL
Applies to:Python Object
See:For more information, see Using Python Objects.

Syntax

DECLARE OBJECT object-reference(PYTHON<("module-name")>);

Required Argument

object-reference

specifies the reference name for the Python object.

Optional Argument

"module-name"

specifies a module name stored inside the Python object.

Note: This is not the name of the function and does not create a function.

Details

The DECLARE statement is used to create a Python object and name the Python module. Python objects can be declared only in a PROC FCMP program.

Example

proc fcmp;
   declare object py(python("MyPyModule"));
   declare object py2(python);
run;

There is no output returned from declaring Python objects.

Last updated: August 19, 2026