BookmarkSubscribeRSS Feed
Barkamih
Pyrite | Level 9

 Hi all; 

I have an error by using this code to transport files from SAS to word file !

Any help?

I need someone to edit this code to make proper for my requirement.

thank you so much for your time 

Ibrahim  

 

 ods graphics/attrpriority=none rtf file = 'C:\Users\Barkamih\Desktop\Graphs\milkkg.rtf';
proc sgplot data=fit;
series y = Milk_Yield  x = Days_In_Milk / group=pr;
xaxis values=(0 to 320 by 20);
yaxis values=(0 to 40 by 2);
styleattrs datacontrastcolors=(RED BLUE Green black) datalinepatterns=(ShortDash MediumDash LongDash solid);
run;
ods rtf close;

 this is the error that I got 

 

320 ods graphics/attrpriority=none rtf file = 'C:\Users\Barkamih\Desktop\Graphs\milkkg.rtf';
---
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, ANTIALIAS, ANTIALIASMAX, ATTRPRIORITY,
BORDER, BYLINE, DATASKINMAX, DISCRETEMAX, DRILLTARGET, GROUPMAX, HEIGHT, IMAGEMAP,
IMAGENAME, LABELMAX, LABELPLACEMENT, LEGENDAREAMAX, LOESSMAXOBS, LOESSOBSMAX,
MAXLEGENDAREA, NOANTIALIAS, NOBORDER, NOIMAGEMAP, NOSCALE, NOSCALEMARKERS, NOSUBPIXEL,
OUTPUTFMT, PANELCELLMAX, POP, PUSH, RESET, SCALE, SCALEMARKERS, SHOW, STACKDEPTHMAX,
SUBPIXEL, TIPMAX, WIDTH.
ERROR 76-322: Syntax error, statement will be ignored.
321 proc sgplot data=fit;
322 series y = Milk_Yield x = Days_In_Milk / group=pr;
323 xaxis values=(0 to 320 by 20);
324 yaxis values=(0 to 40 by 2);
325 styleattrs datacontrastcolors=(RED BLUE Green black) datalinepatterns=(ShortDash MediumDash
325! LongDash solid);
326 run;

NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds

WARNING: No output destinations active.
NOTE: There were 99718 observations read from the data set WORK.FIT.

327 ods rtf close;

1 REPLY 1

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 703 views
  • 1 like
  • 2 in conversation