-- $Source: /commtar/monoBANK/CICS_INTF/fcs_tst.ada,v $ -- $Revision: 1.4 $ $Date: 88/03/19 12:54:44 $ $Author: chris $ with CICS_String_File_Control; with CICS_terminal_Control; procedure fcs_tst is type Fields is (Key, Text); type Lens_Array is array(Fields) of Integer; package sfc is new CICS_String_File_Control(Fields, Lens_Array, (8,40)); Element : sfc.Element_Type (1..48); KeyA : sfc.Key_Type(1..8) := "xxxxxxxx"; passing : Boolean := True; EPtr : sfc.Element_Ptr_Type; Txt : string(1..40); begin Element := (others=>' '); sfc.Set_Field(Element, Key, KeyA); sfc.Set_Field(Element, Text, "this is a test"); sfc.Write("FILE1", Element, KeyA); sfc.Write("FILE1", "yyyyyyyysecond 2", "yyyyyyyy"); sfc.Start_Browse("FILE1", "aaaa", Generic_Key=>true, Gt_Eq=>true); sfc.Read_Next("FILE1", EPtr, KeyA); Txt := sfc.Field(EPtr.all, Text); if Txt(1..14) /= "this is a test" or KeyA /= "xxxxxxxx" then passing := false; end if; sfc.Read_Next("FILE1", EPtr, KeyA); Txt := sfc.Field(EPtr.all, Text); if Txt(1..8) /= "second 2" or KeyA /= "yyyyyyyy" then passing := false; end if; if passing then CICS_Terminal_Control.Send_Text("Test passed"); else CICS_Terminal_Control.Send_Text("Test failed"); end if; end fcs_tst;