Input SAS Data Set for Examples

Tradewinds Travel has an external file with data on flight schedules for tours.
The following DATA step reads the information and stores it in a data set named AIR.DEPARTURES:
libname mylib 'permanent-data-library';

data mylib.departures;
   input Country $ 1-9 CitiesInTour 11-12 USGate $ 14-26 
         ArrivalDepartureGates $ 28-48;
   datalines;

1          2 3                      4
------------------------------------------------
Japan      5 San Francisco          Tokyo, Osaka
Italy      8 New York               Rome, Naples
Australia 12 Honolulu           Sydney, Brisbane
Venezuela  4 Miami            Caracas, Maracaibo
Brazil     4               Rio de Janeiro, Belem
;
proc print data=mylib.departures;
   title 'Data Set AIR.DEPARTURES';
run;
The numbered fields represent
1 the name of the country toured
2 the number ...

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.