|
Barbara,
The copy member is at the beginning followed by the internal prototypes.
Here is the complete prototype definition section:
*-------------------------------------------------------
* Entry parameter definition
*-------------------------------------------------------
d LS4140R pr ExtPgm('LS4140R')
*------------------------------------------------------
* External procedure prototypes
*------------------------------------------------------
// Create a user space
/Define CRTSPC
// Retrieve message information
/Define QMHRTVM
// C quick sort function
/Define QUICKSORT
// Include defined prototypes
/Include QSRCLS,LSMODPR
// Remove prototype definitions
/Undefine CRTSPC
/Undefine QMHRTVM
/Undefine QUICKSORT
// Print history transactions
d PrtHstTrn pr ExtPgm('PLN0440')
d 10
d 3
d 12
d 2
//-----------------------------------------------------
// Internal procedure prototypes
//-----------------------------------------------------
// Comparison procedure called by QuickSort
d CmpVal pr 10i 0
d * Value
d * Value
// Control history display processing
d Screen01 pr
// Retrieve history; populate subfile and user space
d RtvHst pr
// Print history transactions
d PrtHst pr
// Sort history transactions
d SrtCtl pr
// Subset history transactions
d SubSetHst pr
// Redisplay all history transactions
d SubSetAll pr
// Subset history transactions by transaction amount
d SubSetAmt pr
d * Value
// Subset history transactions by user ID
d SubSetMemo pr
d * Value
// Subset history transactions by effective date
d SubSetEff pr
d * Value
// Subset history transactions by posting date
d SubSetPost pr
d * Value
// Subset history transactions by transaction code
d SubSetTC pr
d * Value
// Subset history transactions by user ID
d SubSetUser pr
d * Value
//-----------------------------------------------------
// Procedure interface for program entry
//-----------------------------------------------------
d LS4140R pi
d* Parm1 10
d* Parm2 10
The only lines above this are comments and F-specs. After are the global
definitions, calcs, and actual procedures.
Rick
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Barbara Morris
Sent: Thursday, July 22, 2004 9:28 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Definition not found for internally defined procedure
Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
>
> I have managed to stump our development staff with this one.
>
> Originally I defined a procedure in my program as follows:
> // Comparison procedure called by QuickSort
> d CmpVal pr 10i 0
> d * Value
> d * Value
>
> p CmpVal b
> d CmpVal pi 10i 0
> d Elem1@ * Value
> d Elem2@ * Value
>
> The program was working fine until I dedided to move the prototype to a copy
> member. When I did this the compile failed with "Definition not found for
> symbol 'CmpVal'.". There are no other compile errors.
>
> I moved the definition back inside the program but still receive the error.
> I know I'm probably missing something real simple but I don't see it and
> several others here don't have any ideas either.
>
> Can anyone help with why the compiler doesn't put the prototype and the
> procedure together?
>
Did you put the /copy in the main source section? Before the P specs?
When you put the prototype back in, where did you put it? (It has to go
before the procedures.)
This mailing list archive is Copyright 1997-2026 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.