|
I'm assuming you want to do a plain old fashioned dynamic call. Here are two short programs that illustrate what to do. I haven't actually tested them. They compile so they're bound to work. <g> Here's the program that gets called. Because it's a standalone program with one procedure it doesn't need explicit begin and end P statements: H dftactgrp(*no) actgrp(*caller) H OPTION( *SrcStmt: *NoDebugIO) F* D madlib pr D adj1 10 const D adj2 10 const D verb 10 const D preposition 10 const D adj3 10 const D D madlib pi D adj1 10 const D adj2 10 const D verb 10 const D preposition 10 const D adj3 10 const D D madlibstring s 256 D C eval madlibstring = 'The ' + %trim(adj1) + ' ' + C %trim(adj2) + ' fox '+ %trim(verb) + ' ' + C %trim(preposition) + ' the ' + %trim(adj3) + C ' dog.' C eval *inlr = *on Here's the program that does the call. The extpgm keyword is essential here: H dftactgrp(*no) actgrp(*caller) H OPTION( *SrcStmt: *NoDebugIO) F* D madlib pr extpgm('MADLIB') D adj1 10 const D adj2 10 const D verb 10 const D preposition 10 const D adj3 10 const D C callp madlib('quick' : 'brown' : 'jumped' : C 'over' : 'lazy') C eval *inlr = *on > -----Original Message----- > From: JMBauman@wardtrucking.com [mailto:JMBauman@wardtrucking.com] > Sent: Thursday, April 04, 2002 10:57 AM > To: rpg400-l@midrange.com > Subject: Calling Program with a Procedure Interface > > > > OK, I am thoroughly confused now. What I want to do is > perform a call from > one program to another. I don't want to define a procedure. > I thought in > RPG IV we are supposed to use the 'PI' to replace the *ENTRY > PLIST. Can > someone make this easy for me? (Ha) > > Thanks > John M. Bauman > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.