- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 .
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
thank you !