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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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