: MIDRANGE dot COM Mailing List Archive

Re: Procedures within procedures?


AddThis Feed Button


Dave,

Your problem is that you are trying to define a procedure within another procedure. That is not possible.

Instead of:

GetFileInf B
GetFileInf PI
<code>
BitIsOn B
BitIsOn PI
<code>
BitIsOn E
GetFileInf E

You need:

GetFileInf B
GetFileInf PI
<code>
GetFileInf E

BitIsOn B
BitIsOn PI
<code>
BitIsOn E

Another potential problem is that you are defining prototypes within a procedure, which makes them invisible outside of that procedure. In general it makes more sense to define prototypes globally.

Joep Beckeringh


Dave Murvin schreef:
James,

The things not defined seem to be fields in some standard /copy members for standard fields and the procedure prototypes. Perhaps I do not understand the sequence of source records. My latest try is as follows:

GetFileInf prototype

GetFileInf B
GetFileInf PI

BitIsOn prototype
KeyTools prototypes
MsgTools prototypes

/copy PgmConstants
/copy UsrSpc structures

Local D spec defines

GetFIleInf code and a few subroutines here

More subprocedures here, such as

BitIsOn B
BitIsOn PI
some procedure code
BitIsOn E

Then finally

GetFileInf E


One of the typical things not found is BitIsOn and the message is linked to the BitIsOn B statement. I have tried moving the specs around in different sequences, but I have not found anything that seems to work very well.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2010 by MIDRANGE dot 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 here. If you have questions about this, please contact