BookmarkSubscribeRSS Feed
jlee8
Fluorite | Level 6

Hi,

 

I'm trying to add some shapes to my report and I found this webpage that explains how to use the annotate macros:

https://usermanual.wiki/Pdf/CarpenterE28099s20Complete20Guide20to20the20SASC2AE20REPORT20Procedure2C...

 

However, when I run the code, I get the following messages and end up with no lines drawn.

 

WARNING: Apparent invocation of macro LINE not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.

 

Here is the code from the webpage.  Do you see any potential problems?  I appreciate and help or insight.  Thanks!

ods pdf style=printer         
file='/sasdata/TEST.pdf'         
startpage=never; 
title1; 
proc report data=sashelp.prdsale(where=(prodtype='OFFICE'))      
nowd;    
%annomac;
* Build the annotate data set; 
data Annolines;    
length function color $8;   
retain xsys ysys '5';    
* Syntax for the LINE macro;     
%*LINE (x1, y1, x2, y2, color, line_type, size);     
%line(.5,69.6,50.5,69.6,blue,1,30);
%line(.5,80.5,50.5,80.5,red,1,30);   
%line(42.2,67,42.2,94,green,1,30);    
run; 
* Use the annotate data set; 
proc gslide anno=annolines;    
run;    quit; 
ods _all_ close; 
3 REPLIES 3
Shmuel
Garnet | Level 18

It seems that you have copied the code as is from the PDF.

Try to add at the end of each %line(.....); with a semicolon.

jlee8
Fluorite | Level 6

Thank you but adding semicolons did not change the outcome.  

ChrisNZ
Tourmaline | Level 20

WARNING: Apparent invocation of macro LINE not resolved.

means that    %annomac  did not run properly.

 

The log should show something similar to

9 %annomac
MAUTOLOCDISPLAY(ANNOMAC): This macro was compiled from the autocall file D:\Program
Files\SAS\SASHome\SASFoundation\9.4\core\sasmacro\annomac.sas

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 601 views
  • 0 likes
  • 3 in conversation