Patrick
re: . . obs=0
I wasn't expecting to do a REORG for this poster. I assumed he wanted to truncate the table with DELETE * and release the deleted space - i.e. not just mark for deletion ...
> I have a macro that applies a DELETE * to several SAS
> tables, but the space in disk doesnt change, how can
> I really delete the records from the table, instead
> of marking them as deleted.
Of course, you may be right that I misunderstood the objective.
As to that trick with WORK.
Should the syntax be embedded in a macro, I would expect the parameter passed to be a one or two level name.
From that &name %scan( &name, -1, . ) always returns the memname, but %scan( &name, -2, . ) won't return the libname if &name is just a one-level name (implying the work library). Hence %scan( WORK.&name, -2, . ) should find WORK where there is no "." in &name.
Of course, it might catch out my accustomed approach in development where I use the user option or lib-ref to catch all one-level names in a permanent dataset 😉