-- $Source: /commtar/monoBANK/CICS_INTF/fc_c_4.ada,v $ -- $Revision: 1.1 $ $Date: 88/03/15 18:09:23 $ $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_c_4 ---------------- 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; begin Start_module("fc_c_4", "lock-unlock sequence for Data Type Files"); declare begin Start_test("fc_c_4_a", "read record for update then unlock"); Key := Pad(integer'image(89999), Key'length); Rec.Count := Key; Rec.Line := Pad( "This is record number " & integer'image(89999), Rec.Line'length); NLF.Write(File=>Recfile, From=>To_host(Rec), Key=>To_host_string(Key)); NLF.Read(File=>Recfile, Element=>Host_rec, Key=>To_host_string(Key), Update=>TRUE); NLF.Unlock(File=>Recfile); NLF.Delete(File=>Recfile, Key=>To_host_string(Key)); Pass_test; exception when Not_open => Unexpected_exception("Not_open"); when Not_Found => Unexpected_exception("Not_found"); when Duplicate_key => Unexpected_exception("Duplicate_key"); when Duplicate_record => Unexpected_exception("Duplicate_record"); when End_file => Unexpected_exception("End_file"); when Others => Unexpected_exception("undocumented exception"); end; End_module; end;