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

I'm trying to convert a sample dataset and its been giving me this error. Not quite sure what I typed wrong:

 

 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 WARNING: Apparent invocation of macro DATA2DATASTEP not resolved.
 61         
 62         %data2datastep(samplemonthanalysis,mydata,,100);
            _
            180
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 63         
 64         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 77         
1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Do you know where the file data2datastep.sas is stored?

 

Here are a couple of additional possibilities for what went wrong.

 

Should your program contain an OPTIONS SASAUTOS= statement that was inadvertently omitted? 

 

Did your EG session try to work with other macros that were not found, before encountering this error?  (This situation can be overcome by just starting a new EG session.)

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

That error is telling you that the macro is never defined.  You either need to have it in code before the call (i.e. a %macro ... %mend; before the code) or %include "..."; another file which does contain that macro definition - again, before you try to use it.

Astounding
PROC Star

Do you know where the file data2datastep.sas is stored?

 

Here are a couple of additional possibilities for what went wrong.

 

Should your program contain an OPTIONS SASAUTOS= statement that was inadvertently omitted? 

 

Did your EG session try to work with other macros that were not found, before encountering this error?  (This situation can be overcome by just starting a new EG session.)

byeh2017
Quartz | Level 8

It seems that a simple reloading of a new session helped with it. Thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 746 views
  • 0 likes
  • 4 in conversation