Hello, I have the following error:
2191 proc print Math338.SE;
----------
22
201
ERROR 22-322: Syntax error, expecting one of the following: ;, BLANKLINE, CONTENTS, DATA,
DOUBLE, GRANDTOTAL_LABEL, GRANDTOT_LABEL, GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL,
HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT, STYLE, SUMLABEL,
UNIFORM, WIDTH.
ERROR 201-322: The option is not recognized and will be ignored.
When I run this code:
data Math338.SE;
set Math338.HW1 (drop = sale expense salesman);
if (region = 'Northeast') then delete;
if (region = 'Northwest') then delete;
if (region = 'Southwest') then delete;
else output Math338.SE;
run;
proc print Math338.SE;
title 'Southeast';
run;But when I run this code:
data Math338.NE;
set Math338.HW1;
if region = 'Southeast' then delete;
if region = 'Northwest' then delete;
if region = 'Southwest' then delete;
else output Math338.NE;
run;
proc print data=Math338.NE;
title 'Northeast';
run;Everything runs fine. The codes are very similar and I cant find anything wrong with the first one. Please help! I have attached the full file if it helps.
You are missing "data = " on your PROC PRINT statement;
proc print data = Math338.SE;
title 'Southeast';
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.