Hi:
FIRSTOBS and OBS are not references to variable values or variable names. FIRSTOBS and OBS allow you to select observations or rows from the data. So, for example, if you do this:
[pre]
%let i = 15;
%let n = 17;
proc print data=sashelp.class(firstobs=&i obs=&n);
title "Firstobs=&i and obs=&n";
run;
[/pre]
Then, PROC PRINT will start selecting rows or observations with ROW 15 and will continue to select observations until the OBS= value is reached (in this case, ROW 17). This means that PROC PRINT will disply rows 15, 16 and 17 from SASHELP.CLASS.
Knowing this behavior of FIRSTOBS and OBS, I am confused about how you think your usage is going to result in the deletion of "all integers from 211 to 236" unless your choice of those same values for &I and &N was coincidental.
When you talk about deleting "integers", to me that seems like you're saying you want to delete variable VALUES, not the variables themselves.
You indicate that you are trying to delete the variables by their variable number or position in the data, but that seems an unnecessary complication or distinction. If you know that you want to delete VARNAMEA, VARNAMEB and VARNAMEZ, then you only need to list those variable names in your DROP statement (or list the variables you want to keep in your KEEP statement).
In addition, I find it hard to undestand how your PROC SQL step is working. MEMNAME in dictionary.columns is a character variable, so the usual construction is:
[pre]
where memname = "&DATASET" OR
where upcase(memname) = "%upcase(&DATASET)"
[/pre]
For some more ideas about how to use DICTIONARY.COLUMNS, you might search through previous forum postings for some of the many examples that have been previously posted here.
In addition, these papersand reference documentation might prove useful:
http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/a001385596.htm
http://support.sas.com/resources/papers/proceedings09/053-2009.pdf
http://www2.sas.com/proceedings/sugi30/057-30.pdf
http://www2.sas.com/proceedings/sugi30/070-30.pdf
http://www2.sas.com/proceedings/sugi29/237-29.pdf
http://www.codecraftersinc.com/pdf/DictionaryTablesRefCard.pdf
http://www.lexjansen.com/pharmasug/2006/tutorials/tu03.pdf
http://www.qsl.net/kd6ttl/sas/sqlutilov.pdf
cynthia