|
Your prototype in the calling program needs to look like this: 0022.00 D Adm01P PR 10 ExtProc('Adm01P') 0023.00 D SrcDtl 35 You forgot to specify the parameter that you are sending into the sub procedure. A good way to get around these mistakes are to use /COPY to bring them in from an external member. Hope that helps, Aaron Bartell -----Original Message----- From: Deepak Deshpande [mailto:deepak.deshpande@patni.com] Sent: Tuesday, January 14, 2003 7:03 AM To: rpg400-l@midrange.com Subject: Procedure parameters error Hello, I have one RPGLE program calling one procedure. I am passing 4 PARM thru a DS. I am getting following compile error. *RNF5407 20 1 More parameters were passed in the prototyped call than are allowed. Can anybody help me? Thanx in advance. Deepak Here I replicate the code of procedure ADM01P. SEU==> ADM01P *************** Beginning of data ************************************* 0001.00 H NoMain 0002.00 H*--------------------------------------------------------------* 0005.00 D SrcDtl DS 0006.00 D PProj 1 5 0007.00 D PSorc 6 15 0008.00 D PType 16 25 0009.00 D PAttr 26 35 0010.00 D* Prototype for Adm01P 0011.00 D Adm01p PR 10 ExtProc('Adm01P') 0012.00 D SrcDtl 35 0017.00 D*--------------------------------------------------------------* 0018.00 P* Beginning of Procedure 0019.00 P Adm01P B Export 0020.00 P*--------------------------------------------------------------* 0021.00 D* Procedure Interface 0022.00 D Adm01P PI 10 0023.00 D SrcDtl 35 0028.00 D QQSrcPF S 10 0029.00 D*--------------------------------------------------------------* ************ Some code 0043.00 C Return QQSrcPF 0044.00 C*--------------------------------------------------------------* 0045.00 P E ****************** End of data **************************************** Here is the RPGLE program. SEU==> ADM01R *************** Beginning of data ************************************* 0032.00 D* Prototype for procedure GetSrcPF 0033.00 D QQSrcPF S 10 0034.00 D Adm01P PR 35 0035.00 D SrcDtl DS 0036.00 D PProj 1 5 0037.00 D PSorc 6 15 0038.00 D PType 16 25 0039.00 D PAttr 26 35 0280.00 C* Call procedure GetSrcPF to get SOurce file name 0281.00 C Eval PProj = QTRPRJD 0282.00 C Eval PSorc = QTRSRCD 0283.00 C Eval PType = QTRTYPD 0284.00 C Eval PAttr = QTRATRD 0285.00 C Eval QQSrcPF = Adm01P(SrcDtl) ****************** End of data **************************************** _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.