# this method views an existing record def rwdgutenloadbookrecord require 'fileutils' @a_gutenbergdatapath = "" @a_gutenbergdatainfo = "" @a_gutenbergdatalocation = "" @a_gutenbergdatalines = "" @a_gutenbergdataspeed = "" @a_gutenbergdatacomments = "" begin # exception trapped block tmpfileName = @a_viewgutenberg + ".gut" fileName = File.join($rwdgutenberg_directory,tmpfileName) fd = File.open(fileName,"r") @a_gutenbergdatapath = fd.readline.chomp @a_gutenbergdatainfo = fd.readline.chomp @a_gutenbergdatalocation = fd.readline.chomp @a_gutenbergdatalines = fd.readline.chomp @a_gutenbergdataspeed = fd.readline.chomp @a_gutenbergdatacomments = fd.readline.chomp fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end