BookmarkSubscribeRSS Feed
AnnieEliz
Calcite | Level 5
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?
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
AnnieEliz
Calcite | Level 5
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.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1336 views
  • 0 likes
  • 2 in conversation