Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax for PROC DELETE with memtype = VIEW

Tags:

sas

According to the PROC DELETE documentation

The following command should work

PROC DELETE LIBRARY=mylibrary DATA=myview MEMTYPE=VIEW

However, when actually using this I get:

ERROR 22-322: Syntax error, expecting on of the following: a name, ;, (, -, '.'.

And then

Error 200-322: The symbol is not recognized and will be ignored

Both errors are centered on the equal sign between memtype and view on the command above.

Could someone with more SAS experience tell me what I am doing wrong. Does PROC DELETE support deleting views?

If I just try to remove the memtype=view I get the warning:

File MYLIBRARY.MYVIEW.DATA does not exist. 

I know there are ways to do this with other commands.. but is there a way to do this with PROC DELETE that I am missing?

like image 402
ftrotter Avatar asked Jun 21 '26 00:06

ftrotter


1 Answers

The manual says to use () around the options.

data myview / view=myview ;
  set sashelp.class ;
run;

proc delete data=myview (memtype=view);
run;

Looks like whoever added the enhancements to PROC DELETE when they took it out of mothballs didn't realize that most SAS statements that have options use a / to signal the start of the options and so they used this (). It looks really strange since normally () following a member name is used to enclose dataset options.

like image 183
Tom Avatar answered Jun 24 '26 06:06

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!