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




On 2012-05-01, at 1:00 PM, midrange-l-request@xxxxxxxxxxxx wrote:

Does COBOL/400 or COBOL /ILE support user-defined functions in any fashion (like RPG and all other modern languages)?

No - not currently to the best of my knowledge.


For example,

Move DayOfWeek(Date-input) to print-line

Where DayOfWeek is a user-defined function returning "Monday" or "Tuesday" or etc.

If not, why not?

There is the notion of User Defined functions in the ANSI 2002 standard but as of 2010 IBM had not implemented it even on the mainframe. Don't know if it has happened since.

Why not? Most seem happy to just use a CALL interface and the IBM i COBOL supports return values.

It used to be that ANSI compliance was essential to be able to bid on government contracts but that requirement seems to have evaporated. With that it became more a question of business justification.

And any more discussion should be on the COBOL list or "He who must be obeyed" will descend upon our heads.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.