sed beginner question

hi and sorry for crossposting...
I have data, the first column is the date ("2011 02 03 12 45") and follow I have the measurements . What I would like to do is:
to read the data line by line and write the data of "today" in a new file and "yesterday" as well in another file, separated by TAB,- and the date should be in the form of "2011/02/03 12:45:00".(today and yesterday is already defined in another script)....
Example of an input file and how the files should be divided into 2 outputfiles:

input file:Filename: 111

2011 02 03 17 00 220 11.3    6.4   9     993.3   5.4     
2011 02 03 16 00 250 11.8    6.4   9     994.6   7.7    
2011 02 02 20 00 240 10.8    4.0   7     994.5   9.4      
2011 02 02 19 00 240 12.4    4.2   7     994.6   9.1      
2011 02 02 18 00 240 11.8    3.8   7     994.4   9.9      

output:Filename:111_20110203

2011/02/03 17:00:00    220    11.3    6.4    9    993.3    5.4     
2011/02/03 16:00:00    250    11.8    6.4    9    994.6    7.7     


ouput2:filename:111_20110202
2011/02/02 20:00:00    240    10.8    4.0    7    994.5    9.4       
2011/02/02 19:00:00    240    12.4    4.2    7    994.6    9.1         
2011/02/02 18:00:00    240    11.8    3.8    7    994.4    9.9

hopefully someone can help me how to do it

something along these lines:
awk -f jur.awk myFile
jur.awk:

BEGIN {
  OFS="\t"
}
{
   cout=FILENAME "_" $1$2$3
   if (cout!=out) {
     close(out)
     out=cout
   }
   $1=$1 "/" $2 "/" $3
   $2=$3=""
   $2=$4 ":" $5 ":" "00"
   $3=$4=$5=""
   gsub(/[  *]/, " ")
   $1=$1
   print >out
}

use /usr/xpg4/bin/awk or gawk on Solaris.

I would use awk:

awk '{
  if (!_[$1, $2, $3]++) {
    fn && close(fn)  
    fn = FILENAME "_" $1 $2 $3
    }
  printf "%s/%s/%s %s:%s:00\t", $1, $2, $3, $4, $5, $6 > fn
  for (i = 5; ++i <= NF;)
    printf "%s", ($i (i < NF ? OFS : RS)) > fn
  }' OFS=\\t 111

---------- Post updated at 11:16 PM ---------- Previous update was at 11:13 PM ----------

Actually this one is better, no need to build an array when the data is ordered.