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



"Joel R. Cochran" wrote:
> 
> Thanks Barbara (and Phil)... I just can't get my head around treating full
> blown programs like sub-procedures, so just a couple more questions:
> 
> Can I omit the EXPORT keyword?

The EXPORT keyword for a procedure goes on the P-spec.  Since there is
no P-spec for main procedures, you don't specify it :).  (See below re
P-specs).

> Is there a way to have both the PI and the *ENTRY? (just curious)

I just tried this.  I get:

*RNF5401 30 a      001800  The entry parameters have already been
defined using a
                           procedure-interface definition.

> I assume I need the P specs?

No.  These are for subprocedures.  Not main procedures.

> 
> Here's my example if someone could verify that I'm on track...
> 
> In the calling program:
> 
> d autocomp        pr                  extpgm('SALAUTO2')
> d sbrecn                         7  0
> d sbstry                         3
> d sbfrpr                         8  0
> d sbtopr                         8  0
> 
> In the CALLPed program:
> 
> d autocomp        pr                  extpgm('SALAUTO2')
> d sbrecn                         7  0
> d sbstry                         3
> d sbfrpr                         8  0
> d sbtopr                         8  0
> 
> d autocomp        pi
> d sbrecn                         7  0
> d sbstry                         3
> d sbfrpr                         8  0
> d sbtopr                         8  0
> 
> What I'm getting at is do I still need the name 'autocomp' on the PI?

When I remove it, I get:

*RNF3781 30      7 000700  The procedure-interface definition for the
main procedure
                           must have a name.

> If
> this was a sub-procedure I would have the EXPORT keyword, do I not need that
> here?

Again, there is no P-spec.

> 
> Thanks... since I do sub-procedures all the time this shouldn't be so hard
> for me... just getting adle brained! :)

Just code it up and try it.  The compiler will tell you if you have
problems!!


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.