*Program 26-4 Joining two tables (Cartesian Product); *Note: You need to create this data set since there is another permanent SAS data set called DEMOGRAPHIC used earlier in the book; data demographic; input Subj : $3. DOB : mmddyy10. Gender : $1. Name : $20.; format DOB mmddyy10.; datalines; 001 10/15/1960 M Friedman 002 8/1/1955 M Stern 003 12/25/1988 F McGoldrick 005 5/28/1949 F Chien ; title "Demonstrating a Cartesian Product"; proc sql; select health.Subj, demographic.Subj, Weight, Name, Gender from health, demographic; quit; *Program 26-5 Renaming the two Subj variables; title "Renaming the Two Subj Variables"; proc sql; select health.Subj as Health_Subj, demographic.Subj as Demog_Subj, Weight, Name, Gender from health, demographic; quit; *Program 26-6 Using aliases to simplify naming variables; proc sql; select h.Subj as Subj_Health, d.Subj as Subj_Demog, Weight, Name, Gender from health as h, demographic as d where h.Subj eq d.Subj; quit;