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

I want to run a python file from SAS EG using the PROC FCMP procedure, however declaring the python object  SAS gives me a syntax error even on the most basic component (see below):

 

proc fcmp;
declare object py(python);
run;

Running this gives me the following errors:

NOTE: Writing HTML(EGHTML) Body file: EGHTML
27         
28         
29         proc fcmp;
30         declare object py(python);
                   ______
                   22
                   76
ERROR 22-322: Syntax error, expecting one of the following: HASH, HITER.  
ERROR 76-322: Syntax error, statement will be ignored.
31         run;

NOTE: Execution aborted because of errors in program.
      Reenter the corrected program or enter "QUIT;" to exit procedure.

Can anyone please help

1 ACCEPTED SOLUTION

Accepted Solutions
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @kashlik123 

 

Just an idea: Calling Phyton functions from FCMP came with 9.4 M6, so it wouldn't work in M5 or older.

 

 

 

View solution in original post

7 REPLIES 7
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @kashlik123 

 

Just an idea: Calling Phyton functions from FCMP came with 9.4 M6, so it wouldn't work in M5 or older.

 

 

 

kashlik123
Obsidian | Level 7

9.03.01M1P110211

ballardw
Super User

@kashlik123 wrote:

9.03.01M1P110211


That is SAS 9.3 and way before any of the Python stuff is available

kashlik123
Obsidian | Level 7

I tried running the same code on a different server with SAS 9.4. Here are the results:

30         %put &sysvlong;
9.04.01M3P062415
31         


32         proc fcmp;
33         declare object py(python);
ERROR: Object type 'python' not found for object creation.
34         quit;

Any idea what might cause this?

 

Tom
Super User Tom
Super User

@kashlik123 wrote:

I tried running the same code on a different server with SAS 9.4. Here are the results:

30         %put &sysvlong;
9.04.01M3P062415
31         


32         proc fcmp;
33         declare object py(python);
ERROR: Object type 'python' not found for object creation.
34         quit;

Any idea what might cause this?

 


You are using a 10 year old version of SAS.

https://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-so...

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 7 replies
  • 2760 views
  • 0 likes
  • 5 in conversation