-- $Source: /commtar/monoBANK/CICS_INTF/fc_b_2.ada,v $ -- $Revision: 1.2 $ $Date: 88/03/30 18:37:11 $ $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_2 ---------------- is use Numbered_line_file_pkg; package NLF renames Numbered_line_file; Host_rec : Host_numbered_line_record; Rec : Numbered_line_record; Key : Count_type; Subkey : string(1..4); begin Start_module("fc_b_2", "raise Duplicate_Record"); Flush_numbered_line_file; Key := Pad("89990", 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_2_a", "raise Duplicate_Record by writing to file"); Key := Pad("89990", Key'Length); NLF.Write(File=>Recfile, From=>To_host(Rec), Key=>To_host_string(Key)); Fail_test; exception when Duplicate_record => Pass_test; when Others => Unexpected_exception("undocumented exception"); end; Flush_numbered_line_file; End_module; end;