× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Calling Service Programs from ILE Cobol
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 29 Nov 00 22:02:56 +1100

M
Hello JP,

You wrote:
>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?

Yes.  You should be using CALL LINKAGE TYPE IS PROCEDURE or define the routine 
as a 
procedure in the special names paragraph.

>I have also tried creating a single program, binding in both modules
>but still got the same error.

Same problem.  It makes no difference whether the routine is in another module 
in the 
same program or in a service program.  You use CALL LINKAGE TYPE IS PROCEDURE 
to invoke 
it.  CALL defaults to LINKAGE TYPE IS PROGRAM and is for dynamic *PGM to *PGM 
calls.  
Bound routines whether bound by copy (in a *MODULE) or bound by reference (in a 
*SRVPGM) 
are PROCEDUREs.

>The same question would apply to a CL program, is there a special way
>of calling ILE functions?

Use CALLPRC.

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
+---
| This is the COBOL/400 Mailing List!
| To submit a new message, send your mail to COBOL400-L@midrange.com.
| To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
| To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.