Page 1 of 1

Test the PACKAGE and FETCH functions in PLI

PostPosted: Sat May 31, 2008 3:10 pm
by Peter Kendlbacher
Hallo everyone!

I use PLI Version 3.5 and want to test the PACKAGE and FETCH funktions in PLI, but it don't works completely.
For the compiler I have used DLLINIT.

I hope some of you have an Idea.

thanks

Peter

Here is the source of the package:

KHT14: PACKAGE EXPORTS (PROC1,PROC2);

PROC1: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('HELLO1');
END;

PROC1: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('HELLO2');
END;

And this ist the source of the Main Programm:

KHT15: PROCEDURE OPTIONS (MAIN);

DCL KHT14P1 ENTRY CONSTANT;
DCL KHT14P2 ENTRY CONSTANT;

FETCH KHT14P1 TITLE('KHT14/PROC1);
FETCH KHT14P2 TITLE('KHT14/PROC2');

CALL KHT14P1;
CALL KHT14P2;

END KHT15;

Here is the error message:

IBM0590S ONCODE=9250 The fetchable procedure with entry KHT14/PROC1 could not be found.
From entry point KHT15 at statement 29 at compile unit offset +00000088 at entry offset +00000088 at address
0F700D08.

The funny thing :)

If I remove the "/PROC1" Text in the Fetch Statement, then it works and the first procedure in the package runs.

Re: use Package

PostPosted: Sat May 31, 2008 3:44 pm
by dick scherrer
Hello Peter and welcome to the forums,

I don't "speak" PLI but, Unless your post has a typo (different than what is really on your system), PROC1: is mentioned 2 times and PROC2: is not there. . .

Might this be another of the infamous IBM "results may be unpredictable"?

Re: Test the PACKAGE and FETCH functions in PLI

PostPosted: Mon Jun 02, 2008 1:57 pm
by Peter Kendlbacher
Hi d.sch.

thanks for the fast reply.

Unfortunately I made copy/paste mistake. In my real code there is only one PROC1.

I hope you have another good idea.

Peter