Hi:
Well, since you did not post the CONTENTS for your datasets (as requested by Peter C), it is hard to understand exactly what's going on. Your original version of the error message was:
variable id was not found in data file
But that was not an actual LOG message -- just what you reported was the log message. Now you say that the error is related to ROWID. I'd really like to see the ACTUAL SAS log -- for the ACTUAL code that you ran.
Also, Peter's request to see the CONTENTS was a good debugging technique. Clearly, you have a mismatch between the variables in these datasets:
ccar.Tracking
ccar.level_5_skillgroupid_null
Dupes_virtual_queue
If your original BASE= dataset has a variable called ROWID, how did ROWID get into that dataset???? You originally posted:
[pre]
proc append Base =tracking Data = Dupes_virtual_queue force;
run;
[/pre]
So, a comparison of the variables in WORK.TRACKING or CCAR.TRACKING is a very reasonable debugging technique.
How will you keep the ROWID or ID numbers unique everytime you do the append? Do the ROWID numbers need to be unique?? For example, consider the jprogram and output below -- instead of using MONOTONIC with PROC SQL, I just create an OBSNO column using the _N_ automatic variable in a DATA step program. There are obvious problems with this approach, which you will see when you review the output. But using _N_ -WITH- some other unique number (such as a date) or some other unique identifier or set of identifiers might be better than just a sequentially assigned observation number.
Just some thoughts and ideas.
cynthia
[pre]
data newclass;
length name $8;
set sashelp.class(obs=2);
obsno = _n_;
orig_file='work.newclass ';
name = catt('xx',name);
run;
proc append base=work.newclass data=sashelp.class(obs=2) force;
run;
proc print data=work.newclass;
title 'After First Append';
run;
data newclass2;
length name $8;
set sashelp.class(obs=5);
obsno = _n_;
orig_file='work.newclass2 ';
name = catt('yy',name);
run;
proc append base=work.newclass data=work.newclass2 force;
run;
proc print data=work.newclass;
title 'After Second Append -- Note OBSNO column now has duplicates';
run;
[/pre]
After the second append -- note how the OBSNO column now has duplicates (the OBS variable on the far left is from PROC PRINT) -- while the OBSNO column is the one I created in the. I also created a variable called ORIG_FILE -- so you could see which file contributed which observations to the appended dataset. The 2 observations with ORIG_FILE of blanks came into the file when the SASHELP.CLASS datset was appended with the WORK.NEWCLASS dataset. After doing the two appends, this is what the FINAL PROC PRINT output looks like:
[pre]
Obs name Sex Age Height Weight obsno orig_file
1 xxAlfred M 14 69.0 112.5 1 work.newclass
2 xxAlice F 13 56.5 84.0 2 work.newclass
3 Alfred M 14 69.0 112.5 .
4 Alice F 13 56.5 84.0 .
5 yyAlfred M 14 69.0 112.5 1 work.newclass2
6 yyAlice F 13 56.5 84.0 2 work.newclass2
7 yyBarbar F 13 65.3 98.0 3 work.newclass2
8 yyCarol F 14 62.8 102.5 4 work.newclass2
9 yyHenry M 14 63.5 102.5 5 work.newclass2
[/pre]