|
On Jun 11, 3:45 pm, datan...@GMAIL.COM ("data _null_,") wrote:
> as long as you have at least 2 spaces between each quoted field the &
> format modifier is the solution you need.
>
> data x;
> infile datalines firstobs=2;
> input (name temp state) (&$quote.);
> age = input(temp,best.);
> drop temp;
> datalines;
> "Name" "Age" "State"
> "Smith AA" "22" "NJ"
> "Tom BB" "44" "CT"
> "Shake CC" "34" "CA"
> ;
> run;
> proc print;
> run;
>
> On 6/11/08, rmat <reg...@gmail.com> wrote:
>
>
>
> > Hi Mike,
>
> > Thanks very much for your solution. However, I am facing another issue
> > as there are space within enclosed quotes (like below). It will be
> > great if you or anybody else can help me regarding this.
>
> > Thanks again, Regi
>
> > data x;
> > infile datalines firstobs=2;
> > input (name temp state) (: $quote.);
> > age = input(temp,best.);
> > drop temp;
> > datalines;
> > "Name" "Age" "State"
> > "Smith AA" "22" "NJ"
> > "Tom BB" "44" "CT"
> > "Shake CC" "34" "CA"
> > ;
> > run;- Hide quoted text -
>
> - Show quoted text -
I'm a bit worried about Mike's experience. DSD option is implemented
to support quoted fields. For example embedded delimiters and/or comma
formatted amounts would be quoted and imported successfully by most
import routines, and I first tested and found that working in an early
SAS6 release. However, I ever checked it with this exact combination:
quoted short simple numeric with DLM=' ' ...... hmmmm
|