|
> From: Nicolas Pont [mailto:nicolas.pont@UNICIBLE.CH]
> WY I THE VAR LIB DOESN'T CONTAIN THE STRING "simc"
> but only c:\test and contain of the variable program
because the length of (&HOME.) + length(program) is greater than length(lib)
use this:
lib="&home"|| trim(program) ||"simc" ;
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
OpSys: WinNT Ver: 8.1
---> cheerful provider of UNTESTED SAS code!*! <---
e-mail your SAS improvements to: suggest@sas.com
archives: http://www.listserv.uga.edu/archives/sas-l.html
remember perspective: the error is not always where it seems to occur! --
RJF2
> data _null_ ;
> length lib $100 ;
> rc=filename('dir',"c:\test");
> dirid=dopen('dir');
> numsel=dnum(dirid);
> program=compress(dread(dirid,i));
> do i=1 to numsel;
> program=compress(dread(dirid,i));
> if program Ne '.' and program Ne '..' then do ;
>
> /* WY I THE VAR LIB DOESN'T CONTAIN THE STRING "simc" */
>
> /*************************************************************
> ****************/
> lib="&home"||program||"simc" ;
> put lib=;
> end ;
> end ;
> rc=dclose(dirid);
> run;
>
|