|
Jim,
What you are looking for is called a prototyped subprocedure. Check the
ILE RPG Programmer's guide for either of those words. Also look at the ILE
concepts guide for background (although as a C programmer this should look
very familiar to you.) Here's a quick ugly snippet:
* dftactgrp(*no) actgrp(qile) dbgview(*source) bnddir(qc2le)
*=====================
* Prototype definition comes first
DRunCmd pr 10i 0
D Command 256a const
*=====================
* Using the function
C eval returncode=RunCmd('DSPLIBL')
*=====================
* Procedure interface at the bottom
PRunCmd b
DRunCmd pi 10i 0
D Command 256a const
* These variables are local to RunCmd...
D rc s 10i 0 inz
* function code goes here
* The function returns a value
C return rc
PRunCmd e
Buck Calabro
Aptis; Albany, NY
> -----Original Message-----
> From: Jim Langston
> Sent: Wednesday, February 02, 2000 5:33 PM
> To: RPG400-L@midrange.com
> Subject: Using % type functions
>
-snip-
> What I would much rather do is something like:
>
> C Eval BSDPuR = %MoveMDYToDate(CMDPuR)
>
> Is this available to me in V3R7M0?
> How do I create a % type function?
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.