/* Chapter 2 */ /* C02S2D01.sas */ libname ia 'c:\workshop\winsas\effi'; options fullstimer msglevel = i; /* Create indexes in the DATA step: */ data Schedule (index = (RouteStart DteFlt = (ScheduledDate FlightNumber) / unique)); set ia.Schedule; run; /* Create indexes in PROC DATASETS: */ proc datasets lib = ia; modify Schedule; index create RouteStart; index create DteFlt = (Scheduled Date FlightNumber) / unique; run; quit; /* Delete indexes in PROC DATASETS: */ proc datasets lib = ia; modify Schedule; index delete RouteStart ; run; quit; /* Create indexes in PROC SQL: */ proc sql; create index RouteStart on ia.Schedule (RouteStart); create unique index DteFlt on ia.Schedule (Scheduled Date FlightNumber); quit; /* Delete indexes in PROC SQL: */ proc sql; drop index RouteStart from ia.Schedule; quit;