Hopefully some one can help me, I have written two Cobol programs, one
is a function, which I made into a Service progam, and the second I
made a program.
I created modules for both programs, the function I then used the
CRTSRVPGM, and the main progam I used CRTPGM, and entered the Service
program in as a bound service program. When I run the main progam, it
runs fine until it calls the function.
I have tried CALL pgm, CALL LINKAGE TYPE IS PROGRAM pgm, but I keep
getting an error telling me that my main program can't find or resolve
to the function.
Can someone please help me, should I be using something other than
CALL? or is there a special version of the call command?
I have also tried creating a single program, binding in both modules
but still got the same error.
The same question would apply to a CL program, is there a special way
of calling ILE functions?
Any help would be greatly appreciated.
Thanks,
JP
6 Woodstown Heights,
Knocklyon, Dublin 16
Ireland.
Mobile = 087-6777208
I don't know about ILE COBOL, but in CL you call a procedure in a
SRVPGM by the CALLPRC command. Also, to do that, you need to Bind the
SRVPGM (Dynamic Binding) to the calling PGM.
Hope it helps
Sarva
Sent via Deja.com http://www.deja.com/
Before you buy.
http://publib.boulder.ibm.com/pubs/html/as400/online/v4r4eng.htm
HTH
--
Dipl.Inf.(FH) Rolf P Mittag
IBM Partner In Development
Leipziger Str. 50
D-69214 Eppelheim
eMl: r...@r-m-e-d-v.de
Fon: +49 (6221) 76 78 60
Fax: +49 (6221) 76 80 26
One thing to check is if the expected entry point is exported from the
service program.. this is controlled by the EXPORT parameter of
CRTSRVPGM. To see which (if any) function entry points are exported, do
DSPSRVPGM SRVPGM() DETAIL(*PROCEXP). For details see the binder
language section of Chapt 4 in the ILE Concepts manual:
http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/DOCNUM/SC41-5606-04
--
Karl Hanson
There is an alternative way which I used. I set up a copybook with the
first line:
LINKAGE TYPE IS PROCEDURE routine1 routine2....
where routine 1 etc are names of service program entries which all programs
could need.
I include this in the SPECIAL-NAMES paragraph of all COBOL programs.
Then the service program entries can just be called as a normal CALL.
Rick
John Part <j...@iol.ie> wrote in message news:3a24554...@news.iol.ie...