To use this program, follow these steps:
  1. Open a SAS editor window (or another text editor)
  2. COPY the program below and PASTE it into the editor window
  3. Edit the program so that the FILE= specification points to where the data file is stored on your system
  4. Save the modified program file and RUN it using SAS
The program is below this line. If no program is listed, the URL to the EML document may be in error. If the EML file does not include all the information needed, the SAS program will have errors or be incomplete.

* Package ID: knb-lter-vcr.10.4;
* Cataloging System:VCR; 
* Data set title: Hog and Cobb Island nesting seabird study, part A. 1990; 
* Data set creator:  Ruth Beck -  ; 
* Metadata Provider:    - Virginia Coast Reserve Long-Term Ecological Research Project ; 
* Contact: Dr. Linda Blum -    - lkb2e@virginia.edu; 
* Contact:    - Information manager - Virginia Coast Reserve Long-Term Ecological Research Project   - jporter@lternet.edu; 
        
Title1 ' Hog and Cobb Island nesting seabird study, part A. 1990' ; 
/* You should replace  'PUT-LOCAL-PATH-TO-DATA-FILE-HERE' (below) with the appropriate path;  
    to your data file (e.g., c:\mydata\datafile.txt). If you want to create a permanent SAS dataset, replace the WORK. specification  
    in the DATA statement (and SET statement in section for range checking) with a valid SAS Library reference. */ 
DATA WORK.data1; 
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */ 
infile 'PUT-LOCAL-PATH-TO-DATA-FILE-HERE' 
                TRUNCOVER; 
input                          
                                    @1 ISLAND  $ 4.     
                                    @8 SPECID  $ 6.     
                                    @17 AGE  $ 1.     
                                    @21 MONTH 2.  
                                    @23 DAY 2.  
                                    @25 YEAR 2.  
                                    @30 COUNT 4. ; 
if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */  
LABEL ISLAND ='Island where doing bird censuses-' ; 
LABEL SPECID ='Species ID-' ; 
LABEL AGE ='Age of bird-' ; 
LABEL MONTH ='Month of census-MM' ; 
LABEL DAY ='Day of census-DD' ; 
LABEL YEAR ='Year of census-YY' ; 
LABEL COUNT ='Numbers of birds or nests seen-none' ;
run;
                
                
                
/* The analyses below are basic descriptions of the variables.
   After testing, they should be replaced. */
                
                
PROC FREQ; 
      TABLES  ISLAND; 
PROC FREQ; 
      TABLES  SPECID; 
PROC FREQ; 
      TABLES  AGE;  
PROC MEANS; 
        VAR MONTH ;  
PROC MEANS; 
        VAR DAY ;  
PROC MEANS; 
        VAR YEAR ;  
PROC MEANS; 
        VAR COUNT ; 
RUN;
                 
TITLE2 'Observations with one or more out of range values'; 
DATA bad1;
SET WORK.data1; 
* List cases where data is out of range;
* Note: if no out of range cases are detected, the variable names will be listed, but no actual cases; 
LENGTH BADVARS $ 255; 
IF ((MONTH NE .) AND (MONTH LT 1)) THEN BADVARS=CAT(TRIM(BADVARS),' MONTH-min'); 
IF ((MONTH NE .) AND (MONTH GT 12)) THEN BADVARS=CAT(TRIM(BADVARS),' MONTH-max'); 
IF ((DAY NE .) AND (DAY LT 1)) THEN BADVARS=CAT(TRIM(BADVARS),' DAY-min'); 
IF ((DAY NE .) AND (DAY GT 31)) THEN BADVARS=CAT(TRIM(BADVARS),' DAY-max'); 
IF ((YEAR NE .) AND (YEAR LT 0)) THEN BADVARS=CAT(TRIM(BADVARS),' YEAR-min'); 
IF ((YEAR NE .) AND (YEAR GT 99)) THEN BADVARS=CAT(TRIM(BADVARS),' YEAR-max'); 
IF (BADVARS NE ''); 
PROC PRINT data=bad1; 
RUN;