Read with a foreach, so you are processing line by line. each line is in some variable in a do loop and parse the string by the begin and end positions. Remember that ruby starts arrays at zero not one.
say your fields above are: 2-bytes field1 2-bytes field2 3-bytes field3 ...
File.foreach(filename) do |line| field1 = line[0,1] field2 = line[2,3] field3 = line[4,6] ...
--call a database and write a row? --do what you want with the data like build a dictionary?
end
Inside the do loop parse each row by treating the string as an array: remember ruby arrays start at zero