From: Tom Abernathy on
On Dec 30, 1:16 pm, hallbird <hallbi...(a)gmail.com> wrote:
> Guys,
> I've solve it,
> I'll put the code maybe someone will required
>
> "
> data abbas;
> set Match_date;
> call symput ("Filename", a);
> call execute('%doimportt(&Filename)');
> run;
> "
> one thing, after the flat loaded, how can I make column CustomerID
> primary key dynamically or thorugh the csv is there way ?
> thanks

If you have the data already in a dataset variable then you do not
need to force it into a macro variable just to generate code with CALL
EXECUTE. So you can replace the two lines with:
CALL EXECUTE('%doimportt('||trim(a)||')');
This will generate the macro call with the value of the dataset
variable A as the first positional parameter.

I am not sure what you mean by primary key as SAS does not really have
the language constructs to support that. Perhaps you mean that you
want to sort the SAS dataset by the CUSTOMERID variable? That would be
simple now that you alreay have the macro DOIMPORTT. You can just add
a PROC SORT step after the PROC IMPORT step.

- Tom Abernathy