0
votes

I have a dataset in PC SAS which I made some time ago and daily a new version is created ( a trigger file).

There are two, or maybe three variables which I want to pull in from this dataset to a new PC SAS data set that I am going to create and I want to write the code to import this rather than use import wizard.

Could someone please give me an example of how this would be written?

I have never wanted data from previous datasets I have made, I normally proc sql the data - although for reasons economic reasons I would rather pull from this dataset on this occasion.

1
Can you give a concrete example with dataset names, how they're created, and which variable you want to pull in?mcpeterson

1 Answers

1
votes

I think you want something like the following:

data new_dataset;
   set existing_dataset(keep = variable1 variable2 variable3);
run;

This might be overly simplified, but we can provide more detail if you expound on any issues you run across.