-- $Source: /commtar/monoBANK/CICS_INTF/io_b.ada,v $ -- $Revision: 1.2 $ $Date: 88/03/17 15:45:10 $ $Author: chris $ with CICS_test_reporter; use CICS_test_reporter; with CICS_exceptions; use CICS_exceptions; with Direct_io; with Sequential_io; with Text_io; with Calendar; ----------------------- package io_b_1_task_pkg ----------------------- is I : integer := Start_Module("io_b_1", "raise Use_error by issuing " & "CICS IO commands from unrestricted tasks"); task type A is pragma priority(9); end; task type B is pragma priority(8); end; task type C is pragma priority(7); end; task type D is pragma priority(6); end; Task_A : A; Task_B : B; Task_C : C; Task_D : D; end; ---------------------------- package body io_b_1_task_pkg ---------------------------- is task body A is package DIO is new Direct_io(Element_type=>integer); Q1 : DIO.File_type; begin Start_test("io_b_1_a", "raise Use_error by creating temp queue"); DIO.Create(File=>Q1, Name=>"Q1"); Fail_test; exception when DIO.Use_error => Pass_test; when Others => unexpected_exception("undocumented_exception"); end; task body B is package SEQ is new Sequential_io(Element_type=>integer); Q1 : SEQ.File_type; begin Start_test("io_b_1_b", "raise Use_error by creating transient queue"); SEQ.Create(File=>Q1, Name=>"Q1"); Fail_test; exception when SEQ.Use_error => Pass_test; when Others => unexpected_exception("undocumented_exception"); end; task body C is begin Start_test("io_b_1_c", "raise Use_error by writing text_io"); Text_io.put_line("ababcadabra"); Fail_test; exception when Text_IO.Use_error => Pass_test; when Others => unexpected_exception("undocumented_exception"); end; task body D is T: Calendar.Time; begin Start_test("io_b_1_d", "use Calendar.ClocK"); T := Calendar.Clock; Pass_test; exception -- when Use_error => Pass_test; when Others => unexpected_exception("undocumented_exception"); end; end; with CICS_test_reporter; use CICS_test_reporter; with io_b_1_task_pkg; ---------------- procedure io_b_1 ---------------- is begin End_module; end;