Help using Base SAS procedures

Proc Sql and Generation Datasets

Reply
New Contributor
Posts: 2

Proc Sql and Generation Datasets

Per the documentation, "A generation data set is created each time the file is updated". We use Proc SQL to update and insert into an existing dataset, but are finding generations are not created. Is there a Proc Sql parameter that needs to be specified to generate the generation datasets?
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Sql and Generation Datasets

Share SAS code related to creating and maintaining your SAS "data file" generation data set, for more meaningful feedback to your post.

Scott Barry
SBBWorks, Inc.
New Contributor
Posts: 2

Re: Proc Sql and Generation Datasets

Following displays the type of processing being used. The last data step was just done to see if generation dataset would be created. It was.

data test.sample (genmax=5);
x=4;
y=5;
output;
run;
data _null_;
call sleep(60,1);
run;
Proc SQL;
Update test.sample
Set x=7
Where y=5;

quit;

data _null_;
call sleep(60,1);
run;

proc sql;
insert into test.sample
values(10,34)
values(45,33);

quit
;
data _null_;
call sleep(60,1);
run;

proc sql;
delete from test.sample
where x=45;
quit;

data _null_;
call sleep(60,1);
run;

data test.sample;
set test.sample;
if x=10 then y=4;
run;

After running the above code, the only datasets in the library were
Oct 7 15:32 sample#001.sas7bdat
Oct 7 15:33 sample.sas7bdat

Log indicated records were updated, inserted and deleted.

Thanks for help.
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Sql and Generation Datasets

I would recommend contacting SAS support for further guidance. I see no tech notes on the support website specifically about generation data sets and PROC SQL interaction. If PROC SQL is not supported, it should be clearly stated in the SAS DOC under the topic Understanding Generation Data Sets, in the SAS Language Reference: Concepts guide.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 3 replies
  • 120 views
  • 0 likes
  • 2 in conversation