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



CallP is only mandatory if you want to specify an (E) extender to trap errors.
Sometimes the (E) extender and monitor groups return different error messages, since with monitor an additional step is performed.

Example: CHAIN(E) ...; will return in the message text within the program status data structure the job that locks a record, while MONITOR; Chain ... On-Error; EndMon; will only return a generic message text.

It doesn't matter whether a program or procedure is called. If a dynamic program or a static procedure call is performed, depends on the keywords EXTPGM and EXTPROC specified within the prototype.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Brian Parkins
Gesendet: Sunday, 10.2 2013 01:33
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: Re: CallP Versus Program 'CALL'

Having said that, you should not be doing either one. CALL, CALLB
and CALLP are all obsolete. What you should be doing is prototyping the program calls.

Alan, maybe I have misunderstood one of the points you are making. Taking you own example:

D CreateBFile...
D Pr ExtPgm('ABCPGM')
D PR_CustomerNumber...
D 8a Const
D PR_Amount...
D 7p 2 Const
/Free

CreateBFile('A0001':12.50);

CallP CreateBFile('A0001':12.50);

/End-Free

There is _no_ difference between the two lines of code which invoke the CREATEBFILE routine – both are calling an external program. As Joe Pluta indicated, the CALLP operation can be omitted in the same way that EVAL can be omitted in free-format calculations. CALLP is far from obsolete.

I agree program calls should be prototyped. However, the omission of the CALLP, (from program and procedure calls) is just a matter of syntax and style. (Personally, I prefer the CALLP to be explicitly coded so as to avoid any possible confusion with function usage, array references, etc.)

Brian Parkins.
--
This is the RPG programming on the IBM i (AS/400 and 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 ...

Follow-Ups:
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.