|
Hi,I am desperately looking for a cobol service program on AS400 ILE environment.
Please Help. Regards On Wed, 04 Oct 2006 Simon Coulter wrote :
On 04/10/2006, at 9:52 PM, <Geir.Kildal@xxxxxxxxxxxxxxx> wrote:> My environment is COBOL, but I do have a couple of RPGLE-pgms, from > where I need to call a COBOL pgm passing parameters to an from.>> Can anyone describe the CALL-statement in RPGLE for me please? And the> definition of the parameters. Thanks. Refer to RPGLE Reference manual for details. Old fashioned but simplest method: CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq. ... C CALL 'COBOLPGM' C PARM p1 100C PARM p2 15 5Slightly better but still old fashioned method: CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq. ... C COBOLPARMS PLIST C PARM p1 100C PARM p2 15 5C CALL 'COBOLPGM' COBOLPARMS Modern method (fixed form): DName+++++++++++ETDsFrom+++To/ L+++IDc.Keywords+++++++++++++++++++++++++++++ D cobolPgm PR EXTPGM('COBOLPGM') D p1 100 D p2 15 5 D parm1 S 100 D parm2 S 15 5 CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq. ... C CALLP cobolPgm( parm1 : parm2 ) Modern method (free form): DName+++++++++++ETDsFrom+++To/ L+++IDc.Keywords+++++++++++++++++++++++++++++ D cobolPgm PR EXTPGM('COBOLPGM') D p1 100 D p2 15 5 D parm1 S 100 D parm2 S 15 5 /FREE cobolPgm( parm1 : parm2 ); /END-FREEObviously there will be other code involved to set the parameter values and the parameter definitions will be different (i.e., data types and number of parameters) but you should get the gist of it and the COBOLLINKAGE must have matching parameter definitions. Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 \ / X ASCII Ribbon campaign against HTML E-Mail / \-------------------------------------------------------------------- --This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing listTo post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-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.