× 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.



More to the point, it would depend on what your assumptions are, in the
first place.  Not knowing that, this would be an impossible question to
answer "perfectly" correctly.

If you're working on the assumption that you MIGHT eventually be moving to
/FREE, then you might also consider parallel efforts.  Develop the code in
/FREE as well as using a more structured, fixed-form method.

RPG-wise, I prefer fixed, but in certain situations free has advantages,
also.  I don't believe in throwing out ALL free, just to get rid of it's
disadvantages.  Just like I'd rather not throw out ALL fixed-form calcs,
just to get rid of it's disadvantages.


| -----Original Message-----
| From: rpg400-l-bounces@xxxxxxxxxxxx
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Booth Martin
| Sent: Sunday, October 26, 2003 12:08 AM
| To: rpg400-l@xxxxxxxxxxxx
| Subject: Re: Starting out with sub-procedures
|
|
| Please excuse my stepping so slowly. I want to be sure I don't
| make invalid
| assumptions since this is not clear to me yet. May we stay in the fixed
| format for this as FREE is just one more possible point of failure for me?
|
| Can my main program be correct and complete as far as a sub procedure is
| concerned if it has only these two lines?:
|
| D/copy protosrc,pDoCmd
| ....
| C callp (e) docmd('WRKSPLF')
|
| --------------------------------------------------------
| Booth Martin http://www.MartinVT.com
| Booth@xxxxxxxxxxxx
| ---------------------------------------------------------
|
| -------Original Message-------
|
| From: RPG programming on the AS400 / iSeries
| Date: Friday, October 24, 2003 1:41:18 PM
| To: rpg400-l@xxxxxxxxxxxx
| Subject: Re: Starting out with sub-procedures
|
| ...You could easily write a wrapper procedure that takes one CONST
| VARYING string parameter, that computes the length of that command
| and passes it on to QCMDEXC:
|
| --------------------------------------------------------
| P doCmd b
| D doCmd pi
| D Command 1000a const varying
| D QCmdExc pr extpgm('QCMDEXC')
| D 1000a const
| D 15p 5 const
| /free
| qcmdexc(Command:%len(Command));
| /end-free
| P doCmd e
|
| --------------------------------------------------------
|
| Thus demonstrating another advantage of procedures: Simplifying the
| calling of complex API's. In other words, converting the interface
| of some procedure into a different interface that's somehow better.
| In this case, the caller doesn't have to work out the length. Compare:
|
| doCmd ('CHGJOB DATFMT(' + fmt + ')');
| ...
|
| Cheers! Hans
|
| _______________________________________________
| This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
| To post a message email: RPG400-L@xxxxxxxxxxxx
| To subscribe, unsubscribe, or change list options,
| visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
| or email: RPG400-L-request@xxxxxxxxxxxx
| 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 thread ...

Replies:

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.