-- $Source: /commtar/monoBANK/CICS_INTF/fc_b_3.ada,v $ -- $Revision: 1.5 $ $Date: 88/03/20 15:16:25 $ $Author: chris $ with CICS_test_reporter; use CICS_test_reporter; with File_control_testing_utility; use File_control_testing_utility; with Host_character_pkg; use Host_character_pkg; with CICS_exceptions; use CICS_exceptions; ---------------- procedure fc_b_3 ---------------- is use Numbered_line_file_pkg; package NLF renames Numbered_line_file; Host_rec : NLF.Element_Ptr_Type; Rec : Numbered_line_record; Key : Count_type; Subkey : string(1..4); Host_key : Host_count_type; begin Start_module("fc_b_3", "raise End_File"); Flush_numbered_line_file; Key := Pad("90000", Key'length); Rec.count := Key; Rec.line:= Pad("This is a record in the file", Rec.line'Length); NLF.Write(File=>Recfile, From=>To_host(Rec), Key=>To_host_string(Key)); declare begin Start_test("fc_b_3_a", "raise End_file by reading sequential in " & "ascending order"); NLF.Start_Browse(File=>Recfile, Key=>To_host_string(Key), Gt_eq=>False); NLF.Read_Next(File=>Recfile, Element_Ptr=>Host_Rec, Key=>Host_Key); NLF.Read_Next(File=>Recfile, Element_Ptr=>Host_Rec, Key=>Host_Key); Fail_test; exception when End_File => Pass_test; when Others => Unexpected_exception("undocumented exception"); end; declare begin Start_test("fc_b_3_b", "raise End_file by reading sequential in " & "descending order"); NLF.Reset_Browse(File=>Recfile, Key=>To_host_string(Key), Gt_eq=>False); NLF.Read_prev(File=>Recfile, Element_Ptr=>Host_Rec, Key=>Host_Key); NLF.Read_prev(File=>Recfile, Element_Ptr=>Host_Rec, Key=>Host_Key); Fail_test; exception when End_File => Pass_test; when Others => Unexpected_exception("undocumented exception"); end; NLF.End_browse(File=>Recfile); Flush_numbered_line_file; End_module; end;