Create the data set PROBTEST. The DATA step uses ROUTED, the file containing PROC FREQ output, as an input file and creates the data set PROBTEST. This DATA step reads all records in ROUTED but creates an observation only from a record that begins with Chi-Squa .


   data probtest;
      infile routed;
      input word1 $ @;
      if word1='Chi-Squa' then
         do;
            input df chisq prob;
            keep chisq prob;
            output;
         end;
   run;