× 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 2010/11/5 2:15 PM, Nathan Andelin wrote:

I'm having a hard time following this discussion because I'm aware of the NOMAIN
keyword, which we use in service programs, which don't need cycle code. But I'm
not aware of a "MAIN" keyword. Can somebody clarify?

In 6.1, you can identify one of your procedures as the main procedure using the MAIN keyword. That lets you write a program where all the procedures use P specs. The module is basically like a NOMAIN module except that one procedure is the program-entry-procedure. The main procedure is called a "linear main" (vs a "cycle main") because the code just runs through once and then the linear main procedure ends, just like an ordinary subprocedure.

H main(hello)

D hello pr extpgm('HELLO')
D who 10a const

P hello b
D hello pi
D who 10a const
/free
dsply ('hello ' + who);
/end-free
P hello e

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.