Hi ,
I have attached my code where I am taking value of a field which has latest datetime sorted by account and datetime field . But i am contentiously getting ERROR: File WORK.ALL.DATA does not exist.
if I put
data all;
set rpl_dcf;
by WS_ACCT_NUM;
if last.WS_ACCT_NUM ;
code before sorting then obviously it will say your variables are not sorted something.
Please help that's what is an issue?
Help will be appreciated.
I have attached log message too .
You can't sort ALL because it hasn't been created yet. Try sorting the rpl_dcf data, like this:
Proc sort data =rpl_dcf;
by WS_ACCT_NUM WS_EMAIL_ADDR_LAST ;
run;
You can't sort ALL because it hasn't been created yet. Try sorting the rpl_dcf data, like this:
Proc sort data =rpl_dcf;
by WS_ACCT_NUM WS_EMAIL_ADDR_LAST ;
run;
thanks Rick !
right i did sort rpl_dcf and it worked . one more doubt
is there any difference in
data rpl_dcf;
set rpl.rplcandcf_eaddr083020
rpl.rplcandcf_eaddrpii083020;
run;
or
data rpl_dcf;
set rpl.rplcandcf_eaddr083020;
set rpl.rplcandcf_eaddrpii083020;
run;
Please post the whole log from the step that creates this output. Post the log by copy/pasting it into a window opened with the </> button.
If you use one SET statement
set rpl.rplcandcf_eaddr083020 rpl.rplcandcf_eaddrpii083020;
it reads the datasets in the order. So first it reads the observations from the first one, then it reads those from the second one.
If you use two SET statements
set rpl.rplcandcf_eaddr083020 ;
set rpl.rplcandcf_eaddrpii083020;
it reads one observation from each dataset on each iteration of the data step.
So if the two datasets have N and M observations then the first will yield N+M observations and the second will yield the MIN(N,M) observations.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.