-- $Source: /commtar/monoBANK/CICS_INTF/demo1.ada,v $ -- $Revision: 1.12 $ $Date: 88/04/04 11:25:35 $ $Author: callen $ with CICS_Terminal_Control; with CICS_Exceptions; with Host_Character_Pkg; with CICS_Exec_Interface_Block; use CICS_Exec_Interface_Block; with Demo_Utilities; with Temp_IO; procedure demo1 is package TC renames CICS_terminal_Control; package HC renames Host_Character_Pkg; package DU renames Demo_Utilities; package CEX renames CICS_Exceptions; Output : String(1..18); Data : DU.Data_Record; begin TC.Send_Text(" ", Erase=>TC.Screen); -- clear the screen before starting begin TC.Converse("Address data lookup: Please clear line and enter Last" & " Name.", Output); Temp_IO.Put_Line (Output); exception when CEX.Length_Error => TC.Send_Text("Last name too long, please try again."); return; end ; begin -- need to skip 3 chars (SBA sequence) DU.Dfile.Read("ADDRFILE", Data, HC.To_Host_String(Output(4..18))); exception when CEX.Not_Open => TC.Send_Text("File not open, retry after opening the file.", Erase=>TC.Screen); return; when CEX.Not_Found => TC.Send_Text("Cannot find name in file, Please try another.", Erase=>TC.Screen); return; when others => TC.Send_Text("Name not found, Please try again.", Erase=>TC.Screen); return; end; DU.Dmap.Set_Field(DU.Lname, HC.To_String(Data.lname)); DU.Dmap.Set_Attribute(DU.Lname, (TC.Protected_AutoSkip, TC.Normal_Pen_Detectable, False)); DU.Dmap.Set_Field(DU.Fname, HC.To_String(Data.fname)); DU.Dmap.Set_Field(DU.Company, HC.To_String(Data.company)); DU.Dmap.Set_Field(DU.Street, HC.To_String(Data.street)); DU.Dmap.Set_Field(DU.City, HC.To_String(Data.city)); DU.Dmap.Set_Field(DU.State, HC.To_String(Data.state)); DU.Dmap.Set_Field(DU.Zip, HC.To_String(Data.zip)); DU.Dmap.Set_Field(DU.Phone, HC.To_String(Data.phone)); DU.Dmap.Set_Field(DU.Comments, HC.To_String(Data.comments)); DU.Dmap.Send_Map("DATA", Erase=>TC.Screen); DU.Dmap.Receive_Map("DATA"); TC.Send_Text("Data Received", Erase=>TC.Screen); return; exception when CEX.MapFail => if EIB_AID= Clear then TC.Send_Text("Demo Ended", Erase=>TC.Screen); return; end if; when others => TC.Send_Text("Unexpected exception, Demo Ended", Erase=>TC.Screen); return; end demo1; -- $Cprt start$ -- -- Copyright (C) 1988 by Intermetrics, Inc. -- -- This material may be used duplicated or disclosed by or for the -- U.S. Government pursuant to the copyright license under DAR clause -- 7-104.9(a) (May 1981). -- -- This project was spnsored by the STARS Foundation -- Naval Research Laboratory, Washington DC -- -- $Cprt end$