I have tables in SAS Enterprise Guide like below:
TABLE 1
COL1 | COL2 | ... | COLn
-----|------|------|-------
123 | | ... | xxx
| AAA | ... | xxx
122 | BCC | ... | xxx
... | ... | ... | xxx
And also 2 other tables like below:
TABLE 2
COL1 | ...| COLn
-----|----|------
998 | ...| xxx
999 | ...| xxx
001 | ...| xxx
... | ...| ...
TABLE 3
COL8 | ...| COLn
-----|----|------
117 | ...| xxx
906 | ...| xxx
201 | ...| xxx
... | ...| ...
As you can see TABLE 1 has missing values and I need to:
- fill all missing values of NUMERIC variables by using 0 in each column of TABLE 1 if this column also exists in TABLE 2 or TABLE 3
So, as a result I need something like below, because COL1 (where missing is fill by 0) is in TABLE 2 and COL2 is neither in TABLE 2 nor in TABLE 3, moreover COL2 is not numeric
COL1 | COL2 | ... | COLn
-----|------|------|-------
123 | | ... | xxx
0 | AAA | ... | xxx
122 | BCC | ... | xxx
... | ... | ... | xxx
Only TABLE 1 is relevant, if some column from TABLE 1 is numeric, has missing and exists in TABLE 2 or TABLE 3 fill this column by 0
How can I do that in SAS Enterprise Guide ?