Hello all,
we have a problem that is not easy to describe. Let me try it.
We are building a test supporting system, which allows to do tests of
software
components. The system consists of the following modules or parts:
A - driver, written in ASSEMBLER. The driver builds a LE enclave, so
that it
can call C subfunctions and the test objects, which are (normally) PL/1
routines
B - driver supporting routine, written in C. This routine provides
services OPEN,
WRITE and CLOSE. It is called by the driver. On OPEN, it fetches a
testcase list
from the testcase database and builds a linked list in memory (in the LE
heap).
It also opens a log file for writing. On WRITE, it writes some protocol data
on the log file. On CLOSE, it closes the log file.
C - driver exit, written in ASSEMBLER. It is called at the beginning of
the test object
(at the entry point) by means of TRAP2 interrupts. It has access to the
testcase list
element that B took from the testcase database for the current testcase.
It then calls
D, passing the address of the testcase list element. D reads the
testcase data,
builds a parameter list for the testcase, and returns a parameter list.
Then the
driver exits resumes the test object at the position of the entry point
(this way
the test data is passed to the test object).
D - is a C routine which reads the data from the testcase data base and
builds the
parameter list for the test object - because this is much easier to do
in C than in
ASSEMBLER.
Now the problem:
all works well, if the test object is a PL/1 subroutine and not a main
program. Then
the LE enclave built by A is used by B, passed to the test object, and
used by D as well.
There is no problem passing the LE environment through the TRAP2 interrupt.
But:
we also want to be able to test PL/1 main programs this way. The PL/1
main programs
are called by the driver the same way as the modules are called, but
because they are
started at CEESTART, a second LE enclave below the first enclave is
built. Then C and
D run below the second enclave. This is no problem so far, because there
is no need
to share ressources between the two enclaves; the only information
exchange is through
the testcase list element which belongs to the heap of the first
enclave, and this is no problem,
in our opinion.
But:
when we return from the test object and we try to execute the WRITE call
to B in the
first enclave, it fails in the prologue of B.
We first thought that reg 12 had not be restored correctly, but this is
not the case.
Reg 12 is the same as before the call of the PL/1 main, points to the
original CEECAA.
Also, the save area (including NAB etc, the words behind offsets 72) are
unchanged.
But still, we get abends 0C4 etc. in the prologue of B. But only in the
PL/1 main case,
if there is a second enclave, not in the other case.
We fixed this problem by doing the WRITE and CLOSE calls not in the same
(first)
enclave as the OPEN call, but instead we did all the subsequent calls by
an intermediate
PL/1 main, that is: after the PL/1 test object main destroyed somehow
our first enclave,
we didn't use it any more, but instead constructed new enclaves for
every subsequent
call at the same level. But this doesn't look very sound to me.
My question is: has somebody out there an idea, what has happened here
and what
might be a solution to our problem? Is it possible to have one LE
enclave call another
and on return from the second still have the first one usable? What are
we getting wrong?
Kind regards
Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN