BookmarkSubscribeRSS Feed
beaubrunmrmr
Calcite | Level 5

Seeking help in debugging the error code below 

 

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 1.PROC IMPORT OUT=salesByProductByDate DATAFILE=
__
180
71 ! "/home/emilymoore20/EPG194/output/myTestFolder/BSA570v4_Week3_assignment_data.xlsx"
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
72 2.DBMS=xlsx REPLACE;
 
73 3.GETNAMES=YES;
__
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
74 4.RUN;
__
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
75 5.
__
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
76 6.DATA salesByProductByDate;
 
77 7.SET salesByProductByDate;
__
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
78 8.year = YEAR(date);
__
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
79 9.month = YEAR(date);
__
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
80 10.RUN;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
81 11.
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
82 12.PROC REPORT DATA=salesByProductByDate NOWD;
 
83 13.COLUMN ('Sales' year month) product,(sales);
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
84 14.DEFINE year / GROUP STYLE (header)={background=lightgreen};
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
85 15.DEFINE month / GROUP STYLE (header)={background=lightgreen};
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
86 16.DEFINE product / ACROSS ' ' STYLE(header)={background=lightyellow};
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
87 17.DEFINE sales / SUM STYLE(header)={background=lightyellow} FORMAT=DOLLAR15.2;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
88 18.BREAK AFTER year /SUMMARIZE DOL DUL;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
89 19.RBREAK AFTER/SUMMARIZE;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
90 20.COMPUTE AFTER year;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
91 21.CALL DEFINE('year','style','style=Header{pretext="SubTotal " tagattr="Type:String"}');
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
92 22.ENDCOMP;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
93 23.COMPUTE AFTER;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
94 24.CALL DEFINE('year','style','style=Header{pretext="Grand Total " tagattr="Type:String"}');
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
95 25.ENDCOMP;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
96 26.RUN
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
97 27.
98 28.TITLE '2015 Sales By Product';
 
99 29.PROC SGPLOT DATA=salesByProcudtByDate(WHERE=(year = 2015));
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
100 30.VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
101 31.STAT=sum DATASKIN=gloss;
 
102 32.XAXIS DISPLAY=(nolabel noticks);
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
103 33.YAXIS GRID;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
104 34.RUN;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
105 35.
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
106 36.TITLE '2016 Sales By Product';
 
107 37.PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2016));
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
108 38.VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
109 39.STAT=sum DATASKIN=gloss;
 
110 40.XAXIS DISPLAY=(nolabel noticks);
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
111 41.YAXIS GRID;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
112 42.RUN;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
113 43.
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
114 44.TITLE '2017 Sales By Product';
 
115 45.PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2017));
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
116 46.VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
117 47.STAT=sum DATASKIN=gloss;
 
118 48.XAXIS DISPLAY=(nolabel noticks);
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
119 49.YAXIS GRID;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
120 50.RUN;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
121 51.
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
122 52.TITLE '2018 Sales By Product';
 
123 53.PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2018));
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
124 54.VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
125 55.STAT=sum DATASKIN=gloss;
 
126 56.XAXIS DISPLAY=(nolabel noticks);
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
127 57.YAXIS GRID;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
128 58.RUN;
___
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
129
130
131 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
142
 
1 REPLY 1
JackHamilton
Lapis Lazuli | Level 10

It looks like you have line numbers in your code, that is, you have 

 

1. PROC IMPORT

instead of 

PROC IMPORT

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 448 views
  • 2 likes
  • 2 in conversation