LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 Feb 2001 11:14:27 -0500
Reply-To:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:   Re: PROBLEM WITH CONCATENATION
Comments:   To: Nicolas Pont <nicolas.pont@UNICIBLE.CH>
Content-Type:   text/plain; charset="iso-8859-1"

> 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; >


Back to: Top of message | Previous page | Main SAS-L page