[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re: feature request: implementation "IS EXTERNAL" (se
From: |
Thomas Biehler |
Subject: |
[open-cobol-list] Re: feature request: implementation "IS EXTERNAL" (semantics) |
Date: |
Tue Nov 11 08:20:09 2003 |
User-agent: |
KMail/1.4.3 |
On Sunday 09 November 2003 01:22, you wrote:
> At Tue, 4 Nov 2003 14:11:25 +0100,
>
> Thomas Biehler wrote:
> > in the application which i am trying to port to open-cobol
> > there are many programs which call (many) subprograms
> > and report the success or failure in the calling program
> > via an "external message block".
> >
> > They use a message field (IS EXTERNAL) which the subprogram
> > fills and the calling program references.
> >
> > Without the (full) implementation of is EXTERNAL all program's
> > are to change. (I assume that would be the death of that port !)
> > (Passing the message via Parameter or in another way ...)
> >
> > I have seen that "IS EXTERNAL" is already partially implemented.
> >
> > It would be a great help for me, if it would be completed.
> > (I know that's not trivial)
>
> I have implemented it in CVS. Could you please test it?
>
> Keisuke
Hi Keisuke,
i have tested it with no success.
(First i try our real application.
After that i wrote the two (short) test programs
for the demonstration of the problem)
I have attached my two testprograms:
EXTERNALBUG.cob which calls UPROG.cob
here is the compiler output
with the current CVS-Version of open-cobol:
==============================================================
1) EXTERNALBUG.cob
#> cobc -save-temps -g -v -std=cobol85 EXTERNALBUG.cob
preprocessing EXTERNALBUG.cob into EXTERNALBUG.i
translating EXTERNALBUG.i into EXTERNALBUG.c
gcc -c -o EXTERNALBUG.o -I~/devel/include -g EXTERNALBUG.c
gcc -rdynamic -o EXTERNALBUG EXTERNALBUG.o -L~/devel/lib -lcob -lm -ldb
-lgmp -lltdl -lncurses
EXTERNALBUG.o: In function `EXTERNALBUG':
~/cobol/testprog/EXTERNALBUG.c:42: undefined reference to
`EXTERNAL_GROUP_FIELD'
~/cobol/testprog/EXTERNALBUG.c:43: undefined reference to
`EXTERNAL_GROUP_FIELD'
~/cobol/testprog/EXTERNALBUG.c:36: undefined reference to
`EXTERNAL_GROUP_FIELD'
collect2: ld returned 1 exit status
2) UPROG.cob
#> cobc -save-temps -m -g -v -std=cobol85 UPROG.cob
preprocessing UPROG.cob into UPROG.i
translating UPROG.i into UPROG.c
gcc -c -o UPROG.o -I~/devel/include -g UPROG.c
gcc -shared -o UPROG.so UPROG.o -L~/devel/lib -lcob -lm -ldb -lgmp -lltdl
-lncurses
And here is the expected result : (compiled and running with MF-COBOL)
==============================================================
#> cobrun EXTERNALBUG.int
BEFORE CALL UPROG
ALPHA-FIELD:VALUE FROM EXTERNALBUG
I am the UPROG Program
AFTER CALL UPROG
ALPHA-FIELD:VALUE FROM UPROG
I need some more time for testing and supporting you with the standard
requirements of the "IS EXTERNAL" Feature.
(First i must reread the standards ...)
Perhaps my testprograms are clear enought ?!
(for the (first) problem)
Bye
Thomas
EXTERNALBUG.cob
Description: Text document
UPROG.cob
Description: Text document