From: kwu0914 on
Hi All,

This is a real problem:

There is a dataset A which is updated everyday through user
interaction. Next day, I run a query to subset A and
get data set B.

Now I have to run query everyday to get B in order to capture the
change in A in previous day.

Is there a way to only capture the change without running the subset
query since it takes long time to go through
10M records?

Any thoughts are appreciated!

Kevin
From: data _null_; on
On Aug 12, 12:40 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
> Hi All,
>
> This is a real problem:
>
> There is a dataset A which is updated everyday through user
> interaction. Next day, I run a query to subset A and
> get data set B.
>
> Now I have to run query everyday to get B in order to capture the
> change in A in previous day.
>
> Is there a way to only capture the change without running the subset
> query since it takes long time to go through
> 10M records?
>
> Any thoughts are appreciated!
>
> Kevin

You can use the AUDIT feature, see PROC DATASETS.

This will maintain a dataset(auto trail) of changes to A.
From: kwu0914 on
On Aug 12, 2:19 pm, "data _null_;" <datan...(a)gmail.com> wrote:
> On Aug 12, 12:40 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
>
>
>
>
>
> > Hi All,
>
> > This is a real problem:
>
> > There is a dataset A which is updated everyday through user
> > interaction. Next day, I run a query to subset A and
> > get data set B.
>
> > Now I have to run query everyday to get B in order to capture the
> > change in A in previous day.
>
> > Is there a way to only capture the change without running the subset
> > query since it takes long time to go through
> > 10M records?
>
> > Any thoughts are appreciated!
>
> > Kevin
>
> You can use the AUDIT feature, see PROC DATASETS.
>
> This will maintain a dataset(auto trail) of changes to A.- Hide quoted text -
>
> - Show quoted text -
How to update B if changes of A is recorded in audit trail? Thanks for
your reply!
From: data _null_; on
On Aug 12, 1:47 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
> On Aug 12, 2:19 pm, "data _null_;" <datan...(a)gmail.com> wrote:
>
>
>
> > On Aug 12, 12:40 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
>
> > > Hi All,
>
> > > This is a real problem:
>
> > > There is a dataset A which is updated everyday through user
> > > interaction. Next day, I run a query to subset A and
> > > get data set B.
>
> > > Now I have to run query everyday to get B in order to capture the
> > > change in A in previous day.
>
> > > Is there a way to only capture the change without running the subset
> > > query since it takes long time to go through
> > > 10M records?
>
> > > Any thoughts are appreciated!
>
> > > Kevin
>
> > You can use the AUDIT feature, see PROC DATASETS.
>
> > This will maintain a dataset(auto trail) of changes to A.- Hide quoted text -
>
> > - Show quoted text -
>
> How to update B if changes of A is recorded in audit trail? Thanks for
> your reply!- Hide quoted text -
>
> - Show quoted text -

I didn't understand I thought you just wanted to track changes in A.

So A is transaction data for B?

How do you update B now? Show code with example data would be good.
From: kwu0914 on
On Aug 12, 3:08 pm, "data _null_;" <datan...(a)gmail.com> wrote:
> On Aug 12, 1:47 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
>
>
>
>
>
> > On Aug 12, 2:19 pm, "data _null_;" <datan...(a)gmail.com> wrote:
>
> > > On Aug 12, 12:40 pm, kwu0914 <kwu0...(a)gmail.com> wrote:
>
> > > > Hi All,
>
> > > > This is a real problem:
>
> > > > There is a dataset A which is updated everyday through user
> > > > interaction. Next day, I run a query to subset A and
> > > > get data set B.
>
> > > > Now I have to run query everyday to get B in order to capture the
> > > > change in A in previous day.
>
> > > > Is there a way to only capture the change without running the subset
> > > > query since it takes long time to go through
> > > > 10M records?
>
> > > > Any thoughts are appreciated!
>
> > > > Kevin
>
> > > You can use the AUDIT feature, see PROC DATASETS.
>
> > > This will maintain a dataset(auto trail) of changes to A.- Hide quoted text -
>
> > > - Show quoted text -
>
> > How to update B if changes of A is recorded in audit trail? Thanks for
> > your reply!- Hide quoted text -
>
> > - Show quoted text -
>
> I didn't understand I thought you just wanted to track changes in A.
>
> So A is transaction data for B?
>
> How do you update B now?  Show code with example data would be good.- Hide quoted text -
>
> - Show quoted text -


data A;
input x @@;
datalines;
1 2 3 4 876 98 09056
;
run;

data B; /* QUERY_B */
set A;
if x < 100;
run;


"A" was update everyday, so I have to submit "QUERY_B" to update B
and it take long time.
My question is: is it possible to update B without submitting
"QUERY_B"?
Audit trail is useful to track the changes in A. Is it possible to use
that audit trail info to update
B?

Did I describe the problem clearly? Thanls!