Problem Note 5988: Match Merge in SAS/ASSIST may fail
SAS/ASSIST Software incorrectly lists common variables for a match
merge. Selecting the incorrect variable generates the following error:
ERROR: BY variable XXX is not on the input data set LIB.XXX.
For example, first execute the following SAS code to create the SAS data
sets that you will subsequently merge within SAS/ASSIST:
data one;
set sashelp.class;
keep name age;
proc sort data=one;
by name;
run;
data two;
set sashelp.class;
keep name sex;
proc sort data=two;
by name;
run;
proc freq data=sashelp.class noprint;
tables sex / out=three;
proc sort data=three;
by sex;
run;
Then, from within SAS/ASSIST Software, select Data Mgmt -> Combine ->
Match Merge -> First method. You will want to match merge the data sets
named ONE and TWO on the common variable NAME to create a new data set
named M1. Next select Sort and sort the data set M1 by the variable
SEX. Now select Combine -> Match merge -> First method. You will want
to match merge the data sets named M1 and THREE to create a new table
named M2. When selecting the common variable, only the variable NAME
appears even though NAME is not in the data set named THREE. The
following code will successfully execute outside of SAS/ASSIST:
data m2;
merge m1 three;
by sex;
run;
You can circumvent this problem by saving the code generated by
SAS/ASSIST and make the necessary edits to correct the missing or
invalid variables.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | SAS/ASSIST | Microsoft Windows 2000 Server | 8 TS M0 | |
| Microsoft Windows 95/98 | 8 TS M0 | |
| Microsoft Windows NT Workstation | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | |
| Solaris | 8 TS M0 | |
| OpenVMS VAX | 8 TS M0 | |
| IRIX | 8 TS M0 | |
| 64-bit Enabled Solaris | 8 TS M0 | |
| z/OS | 8 TS M0 | |
| OS/2 | 8 TS M0 | |
| HP-UX | 8 TS M0 | |
| CMS | 8 TS M0 | |
| 64-bit Enabled AIX | 8 TS M0 | |
| 64-bit Enabled HP-UX | 8 TS M0 | |
| OpenVMS Alpha | 8 TS M0 | |
| Tru64 UNIX | 8 TS M0 | |
| ABI+ for Intel Architecture | 8 TS M0 | |
| AIX | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | high |
| Date Modified: | 2002-01-25 13:10:05 |
| Date Created: | 2001-10-03 14:12:55 |