|
1. The main procedure only needs the prototype(PR) for the subprocedure, not the procedure interface(PI). One doing this for real use a /copy to bring in the prototype so it is only defined once. 2. When you are calling the procedure you are only passing one parameter but the procedure requires two. 3. You have defined the return value as being of size 4 although it looks like you are only passing a size of 1 back. This isn't causing an error but it looks inconsistent so I'm pointing it out. 4. In your subprocedure, why have two different If statements? Just use the else for the second condition. Scott Mildenberger > -----Original Message----- > From: fkany@averittexpress.com [mailto:fkany@averittexpress.com] > Sent: Friday, November 22, 2002 7:40 AM > To: RPG400-L@midrange.com > Subject: Main Proc for Subproc not compiling > > > I'm working on trying to compile my first subprocedure. The > subprocedure > compiles fine. The main procedure is not compiling. Can > anyone see what > I'm doing wrong? Thanks everyone. > > Frank > > ============== > Main Procedure > ============== > <snip> > * > * Procedure Prototype > ***Error from Compile: External procedure on prototype for > main procedure is not same as actual external name. > D AAL03_VAL PR 4A > D SRVCTR 3A > D STS_IN 1A > * > * Procedure Interface > D AAL03_VAL PI 4A > D SRVCTR 3A > D STS_IN 1A > > <snip> > > * > * Service Center entered > C IF S01SVCCTR <> *BLANKS > * > * ----------------------- > * Validate Service Center > * ----------------------- > * Record Found > C IF AAL03_VAL(STS_IN) = '1' > ***Errors from Compile: The call passed fewer parameters than > the prototype indicates are required. > The type and attributes of the > parameter do not match those of the prototype. > C EVAL S01CTRNME = CT1NAM > C ENDIF > * Record NOT Found > C IF AAL03_VAL(STS_IN) = '0' > ***Errors from Compile: The call passed fewer parameters than > the prototype indicates are required. > The type and attributes of the > parameter do not match those of the prototype. > C CLEAR S01CTRNME > C ENDIF > > <snip> > ================== > End Main Procedure > ================== > > ===================== > Complete Subprocedure > ===================== > H NOMAIN > * > * Files > FAAL03002 IF E K DISK > * > * Procedure Prototype > D AAL03_VAL PR 4A > D SVCCTR 3A > D STS_IN 1A > * > P AAL03_VAL B EXPORT > * > * Procedure Interface > D AAL03_VAL PI 4A > D SVCCTR 3A > D STS_IN 1A > * > * Validate against Terminal Control File(AAL03002) > C SVCCTR CHAIN AAL03002 > * > C IF %FOUND(AAL03002) > C EVAL STS_IN = '1' > C ENDIF > * > C IF NOT %FOUND(AAL03002) > C EVAL STS_IN = '0' > C ENDIF > * > C RETURN STS_IN > * > P AAL03_VAL E >
As an Amazon Associate we earn from qualifying purchases.
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.