Give you an example which I have coded before.
* _col1 is table name _col3 is english variable name _col4 is label;
set work.label(where=(_col1 is not missing)) end=last;
if _n_ eq 1 then call execute("proc datasets library=&libname memtype=data;" );
if _col1 ne lag(_col1) then call execute('modify '||compress(_col1)||';');
call execute('label '||compress(_col3)||'="'||compress(_col4)||'";');
if last then call execute('quit;');
Thank for all of your posts. I figured this out by using a macro to cycle through the vars I'm working with. In the macro I generate a sas that has the label statement properly formatted. I created it in a seperate file because of the number of variables I have in some of my tables. I'm dealing with over 5000 variables.
So i have 10 or so files that have label statements. Within my main program I use a macro to create the dataset. Within that macro I have a data step that has the %include as part of it. So all my labels get updated. I think I took the long route but I have to have pretty log files and this way does that.