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 (August 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 8 Aug 2007 18:54:09 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: no error msg for dlm=dsd
Comments: To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>

I agree with Howard's interpretation that the characters following the DLM option are interpreted as representing a variable.

Try the following test:

data test1; infile cards dlm=ABC; input x $ y; cards; ABCDEF 1 BCDEFG 2 ABC 3 ; run;

data test2; infile cards dlm=ABC; input x $ y; ABC=' '; cards; ABCDEF 1 BCDEFG 2 ABC 3 ; run;

data test3; infile cards dlm=ABC; input x $ y; ABC='B'; cards; ABCDEF 1 BCDEFG 2 ABC 3 ; run;

Art ------- On Wed, 8 Aug 2007 18:27:29 -0400, Howard Schreier <hs AT dc-sug DOT org> <nospam@HOWLES.COM> wrote:

>On Wed, 8 Aug 2007 14:50:21 -0700, Jack Hamilton <jfh@STANFORDALUMNI.ORG> wrote: > >>Probably a bug. >> >>You can specify dlm='dsd' if you want those characters to be delimiters. >> >> >> >>adac1121@GMAIL.COM wrote: >>> I'd like to know why dlm=dsd didn't get error message >>> dsd is an option not one of dlm= value should be ' ', '09'x, ',' >>> should be...dlm='09'x dsd; >>> Thanks, > >The syntax is OK without the quotes because the DLM= option can designate a >variable instead of a literal. > >I ran (using 9.1.3) > > data _null_; > infile cards dlm=dsd; > input a b c; > put _all_; > cards; > 1 2 3 > ; > >Result: dsd= a=1 b=2 c=3 _ERROR_=0 _N_=1 > >I was surprised at the absence of a variable-is-uninitialized note. I would >expect variable DSD to be created as a *numeric*, possibly making the a >period (derived from the missing value) one of the delimiters, or triggering >some kind of ugliness.


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