17. Listing of the SAS Data Retrieval Programs

This section lists the five SAS data retrieval programs provided by CDIAC with this data base. Each program is designed to read and write the contents of one of the five flat ASCII data files. The first program (WCGRID.SAS, File 3) is designed to read and print the file WCGRID.ASC (File 5).

options ls=80 ps=70;
data wcgrid;
infile 'wcgrid.asc';
input id 5. (elavg elmax elmin) 8.2 (elnum gl gm) (4.)
(slr slg slc sls) (8.2) slyr 4. / (eravg ermax ermin) (8.2)
ernum 4. (travg trmax trlvl) (8.2) trnum 4.
(whavg whmax whsd) (8.2);
proc print noobs;
run;

The second SAS program (WCRISK.SAS, File 7) is designed to read and print the file WCRISK.ASC (File 9).

options ls=80 ps=70;
data wcrisk;
infile 'wcrisk.asc';
input id 5. (elr glr gmr lsr err trr whr) (4.);
proc print noobs;
run;

The third SAS program (WCLINE.SAS, File 11) is designed to read and print the file WCLINE.ASC (File 13).

options ls=80 ps=70;
data wcline;
infile 'wcline.asc';
input id 4. (elavg elmax elmin) (8.2) (elnum elr gl glr gm gmr) (4.)
(slr slg slc) (8.2) / sls 8.2
(slyr lsr) (4.) (eravg ermax ermin) (8.2) (ernum err) (4.)
(travg trmax trlvl) (8.2) (trnum trr) (4.) /
(whavg whmax whsd) (8.2) whr 4.;
proc print;
run;

The fourth SAS program (WCPOINT.SAS, File 15) is designed to read and print the file WCPOINT.ASC (File 17).

options ls=80 ps=70;
data wcpoint;
infile 'wcpoint.asc';
input id 5. (sllong sllat slr slg slc sls) (8.2) slyr 4. /
slname $ 40. (trlong trlat travg trmax trlvl) (8.2) /
trid 4. trname $ 50.;
proc print;
run;

The fifth SAS program (File 19) is designed to read and print the file WCOAST.ASC (File 21).

options ls=80 ps=70;
data wcoast;
file 'wcoast.lst';
infile 'wcoast.asc' dlm=',';
input id $ num1 @;
put @1 'ID' @9 'number of points' @30 'Longitude' @47 'Latitude';
put @1 name @15 num @;
num = num1 * -1;
array long{197};
array lat{197};
do i = 1 to num;
input long{i} lat{i};
put @30 long{i} 9.4 @45 lat{i} 9.4;
end;
run;