Date: Thu, 14 Dec 2006 00:25:26 -0800
Reply-To: Akramx <akram.chriai@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Akramx <akram.chriai@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: no semicolon after a date field
In-Reply-To: <200612131656.kBDFr8cs007657@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
thanks all for your help.
have a nice day.
Ya Huang a écrit :
> I was kind of surprised to see that your code didn't work. Then after
> seeing Toby's code and check the online doc, I know why. The following
> is from Online Doc:
>
> DELIMITER= 'quoted string' | character_variable
> specifies an alternate delimiter (other than blank) to be used for LIST
> output. It is ignored for other types of output (formatted, column, named).
>
> As you can see, del=x only works for LIST output, meaning, you can only
> list the variable names, but not the format.
>
>
>
> On Wed, 13 Dec 2006 16:40:09 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:
>
> >data test;
> >input a YYMMDD10. b;
> >datalines;
> >1997-12-154
> >1980-04-209
> >;
> >run;
> >
> >
> >Data _Null_;
> >Format A YYMMDD10. ;
> >File "/applications/DiseaseAndInjury/MyTest.txt"
> >DLM = ';' ;
> >Set Test;
> >Put a B ;
> >Run;
> >
> >
> >
> >
> >
> >Toby Dunn
> >
> >To sensible men, every day is a day of reckoning. ~John W. Gardner
> >
> >The important thing is this: To be able at any moment to sacrifice that
> >which we are for what we could become. ~Charles DuBois
> >
> >Don't get your knickers in a knot. Nothing is solved and it just makes you
> >walk funny. ~Kathryn Carpenter
> >
> >
> >
> >
> >
> >
> >From: Akramx <akram.chriai@GMAIL.COM>
> >Reply-To: Akramx <akram.chriai@GMAIL.COM>
> >To: SAS-L@LISTSERV.UGA.EDU
> >Subject: no semicolon after a date field
> >Date: Wed, 13 Dec 2006 08:21:24 -0800
> >
> >Hi folks,
> >I create a semicolon delimited text file, but after a field with
> >YYMMDD10. format, there is no semicolon.
> >Can any one help? here is a sample of SAS code.
> >
> >
> >data test;
> >input a YYMMDD10. b;
> >datalines;
> >1997-12-154
> >1980-04-209
> >;
> >run;
> >
> >
> >DATA _null_;
> >file "c:\test.txt" delimiter=';' DSD;
> >set test;
> >put a YYMMDD10. @; /* the @ is needed to have the next values on the
> >same line */
> >put b $;
> >;
> >run;
> >
> >
> >in test.txt I don't have the semicolon between the field a and b; but
> >when i put b before a, i have a semicolon !!
> >
> >_________________________________________________________________
> >All-in-one security and maintenance for your PC. Get a free 90-day trial!
> >http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?
> href=http://clk.atdmt.com/MSN/go/msnnkwlo0050000001msn/direct/01/?
> href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
|