20
We have textbook solutions for you!

The document you are viewing contains questions related to this textbook.
Chapter 3 / Exercise 08
Shelly Cashman Series Microsoft Office 365 & Excel 2019 Comprehensive
Freund/Last
40Table Lookup ApplicationStep 1: Hardcode the program, including customer nameand number.proc print data=orion.order_fact;where customer_ID=9;var order_date order_type quantity total_retail_price;title1 "Customer Number: 9";title2 "Customer Name: Cornelia Krahl";run;m104d03a
41Table Lookup ApplicationStep 2: Create and reference a macro variable for thecustomer number.How can you reference the customer name in TITLE2without hardcoding it?%let custID=9;proc print data=orion.order_fact;where customer_ID=&custID;var order_date order_type quantity total_retail_price;title1 "Customer Number: &custID";title2 "Customer Name: Cornelia Krahl";run;m104d03b
42Table Lookup ApplicationTheorion.customerdata set contains customer namesand ID numbers. Customer ID numbers are unique.Orion.CustomerOrion.CustomerOrion.CustomerOrion.CustomerBirth_Birth_Birth_Birth_ObsCustomer_IDCustomer_NameCountryGenderDateObsCustomer_IDCustomer_NameCountryGenderDateObsCustomer_IDCustomer_NameCountryGenderDateObsCustomer_IDCustomer_NameCountryGenderDate14James KvarniqUSM27JUN197414James KvarniqUSM27JUN197414James KvarniqUSM27JUN197414James KvarniqUSM27JUN197425Sandrina StephanoUSF09JUL197925Sandrina StephanoUSF09JUL197925Sandrina StephanoUSF09JUL197925Sandrina StephanoUSF09JUL197939Cornelia KrahlDEF27FEB197439Cornelia KrahlDEF27FEB197439Cornelia KrahlDEF27FEB197439Cornelia KrahlDEF27FEB1974410Karen BallingerUSF18OCT1984410Karen BallingerUSF18OCT1984410Karen BallingerUSF18OCT1984410Karen BallingerUSF18OCT1984511Elke WallstabDEF16AUG1974511Elke WallstabDEF16AUG1974511Elke WallstabDEF16AUG1974511Elke WallstabDEF16AUG1974612David BlackUSM12APR1969612David BlackUSM12APR1969612David BlackUSM12APR1969612David BlackUSM12APR1969713Markus SepkeDEM21JUL1988713Markus SepkeDEM21JUL1988713Markus SepkeDEM21JUL1988713Markus SepkeDEM21JUL1988816Ulrich HeydeDEM16JAN1939816Ulrich HeydeDEM16JAN1939816Ulrich HeydeDEM16JAN1939816Ulrich HeydeDEM16JAN1939917Jimmie EvansUSM17AUG1954917Jimmie EvansUSM17AUG1954917Jimmie EvansUSM17AUG1954917Jimmie EvansUSM17AUG19541018Tonie AsmussenUSM02FEB19541018Tonie AsmussenUSM02FEB19541018Tonie AsmussenUSM02FEB19541018Tonie AsmussenUSM02FEB19541119Oliver S. FüßlingDEM23FEB19641119Oliver S. FüßlingDEM23FEB19641119Oliver S. FüßlingDEM23FEB19641119Oliver S. FüßlingDEM23FEB19641220Michael DineleyUSM17APR19591220Michael DineleyUSM17APR19591220Michael DineleyUSM17APR19591220Michael DineleyUSM17APR1959
43Table Lookup ApplicationStep 3: Add a DATA step to create a macro variable withthe customer's name. Reference the macrovariable in TITLE2.%let custID=9;data _null_;set orion.customer;where customer_ID=&custID;call symputx('name', Customer_Name);run;proc print data=orion.order_fact;where customer_ID=&custID;var order_date order_type quantity total_retail_price;title1 "Customer Number: &custID";title2 "Customer Name: &name";run;m104d03csamestatement
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 105 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Spring
Professor
VictoriaC.Stodden
Tags
macro variables, Cornelia Krahl, SYMPUTX