BookmarkSubscribeRSS Feed
abdullala
Calcite | Level 5
weird thing: in a macro I had included several scripts using %include. in these scripts I had codes like %if - %then %do - %end. I got error message like:

ERROR: The %IF statement is not valid in open code.

I dont understand how this happened. all these %if stuff are still within the macro, right? Help appreciated!!!
2 REPLIES 2
Peter_C
Rhodochrosite | Level 12
that %include is passed through by the macro language compiler. The code is not opened and interpreted by that compiler, so %if is not valid once the syntax is out of the scope of the macro language compiler.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggest the OP try some additional SAS OPTIONS settings (below) to diagnose further:

OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MPRINT /* MLOGIC */;


Scott Barry
SBBWorks, Inc.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 883 views
  • 0 likes
  • 3 in conversation