|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] please avoid the message below. it's another silly of me. I was calling crtString with a parm. "Ali Ekinci" <Ali.Ekinci@mapics.com> Sent by: rpg400-l-admin@midrange.com 11/18/2002 02:29 PM Please respond to rpg400-l To: <rpg400-l@midrange.com> cc: Subject: re:help for subprocedure calls -- -- [ Picked text/plain from multipart/alternative ] Hi, Could anybody see what is wrong with below module? I am getting *RNF5407 20 1 More parameters were passed in the prototyped call than are allowed. thx in advance, ali Module callRtv: ============= hnomain */////////////////////////////////////////////////////////////////////// * Global fields */////////////////////////////////////////////////////////////////////// D fAlphaValue S O CLASS(*JAVA:'java.lang.String') D fError S O CLASS(*JAVA:'java.lang.String') D fDecValue S 5I 0 */////////////////////////////////////////////////////////////////////// * Prototyes for native methods */////////////////////////////////////////////////////////////////////// D callPgm PR N EXTPROC(*JAVA: D 'CallRtvInfo': D 'callPgm') D pRtvPgm O CLASS(*JAVA:'java.lang.String') D pPgmName O CLASS(*JAVA:'java.lang.String') D pPgmType O CLASS(*JAVA:'java.lang.String') D pInfo O CLASS(*JAVA:'java.lang.String') D pLoopLevel 5I 0 value D pLoopIndex O CLASS(*JAVA:'java.lang.String') D pAlpha N value D pAlphaValue O CLASS(*JAVA:'java.lang.String') D pDecValue 5I 0 value D getError PR O EXTPROC(*JAVA: D 'CallRtvInfo': D 'getError') D CLASS(*JAVA:'java.lang.String') D getAlphaValue PR O EXTPROC(*JAVA: D 'CallRtvInfo': D 'getAlphaValue') D CLASS(*JAVA:'java.lang.String') D getDecValue PR 5I 0 EXTPROC(*JAVA: D 'CallRtvInfo': D 'getDecValue') */////////////////////////////////////////////////////////////////////// * Native methods */////////////////////////////////////////////////////////////////////// P callPgm B EXPORT D callPgm PI N D pRtvPgm O CLASS(*JAVA:'java.lang.String') D pPgmName O CLASS(*JAVA:'java.lang.String') D pPgmType O CLASS(*JAVA:'java.lang.String') D pInfo O CLASS(*JAVA:'java.lang.String') D pLoopLevel 5I 0 value D pLoopIndex O CLASS(*JAVA:'java.lang.String') D pAlpha N value D pAlphaValue O CLASS(*JAVA:'java.lang.String') D pDecValue 5I 0 value D wRtvPgm S 10A D wPgmName S 10A D wPgmType S 10A D wInfo S 5A D wLoopLevel S 5S 0 D wLoopIndex S 250A D wAorD S 1A D wAlphaValue S 256A D wDecValue S 5S 0 D wError S 60A D* D* Prototypes. D* D makeString PR O EXTPROC(*JAVA: D 'java.lang.String': D *CONSTRUCTOR) D CLASS(*JAVA:'java.lang.String') D wParm 256A const varying D* D crtString PR O EXTPROC(*JAVA: D 'java.lang.String': D *CONSTRUCTOR) D CLASS(*JAVA:'java.lang.String') * D getBytes PR 256A EXTPROC(*JAVA: D 'java.lang.String': D 'getBytes') VARYING * D getLength PR 10I 0 EXTPROC(*JAVA: D 'java.lang.String': D 'length') /free wRtvPgm=getBytes(pRtvPgm); wPgmName=getBytes(pPgmName); wPgmType=getBytes(pPgmType); wInfo=getBytes(pInfo); wLoopLevel=pLoopLevel; wLoopIndex=getBytes(pLoopIndex); wAlphaValue=getBytes(pAlphaValue); wDecValue=pDecValue; wError=*blanks; if (pAlpha=*ON); wAorD='A'; else; wAorD='D'; endif; /end-free c call wRtvPgm 90 c parm wPgmName c parm wPgmType c parm wInfo c parm wLoopLevel c parm wLoopIndex c parm wAorD c parm wAlphaValue c parm wDecValue c parm wError c if *in90=*on c eval wError='Program '+wRtvPgm+' has failed.' c end /free fAlphaValue=makeString(wALphaValue); fDecValue=wDecValue; if (wError<>*Blanks); fError=makeString(wError); return *ON; else; fError=crtString(wError); return *OFF; endif; /end-free P callPgm E P getError B EXPORT D getError PI O CLASS(*JAVA:'java.lang.String') /free return fError; /end-free P getError E P getAlphaValue B EXPORT D getAlphaValue PI O CLASS(*JAVA:'java.lang.String') /free return fAlphaValue; /end-free P getAlphaValue E P getDecValue B EXPORT D getDecValue PI 5I 0 /free return fDecValue; /end-free P getDecValue E -- hnomain */////////////////////////////////////////////////////////////////////// * Global fields */////////////////////////////////////////////////////////////////////// D fAlphaValue S O CLASS(*JAVA:'java.lang.String') D fError S O CLASS(*JAVA:'java.lang.String') D fDecValue S 5I 0 */////////////////////////////////////////////////////////////////////// * Prototyes for native methods */////////////////////////////////////////////////////////////////////// D callPgm PR N EXTPROC(*JAVA: D 'CallRtvInfo': D 'callPgm') D pRtvPgm O CLASS(*JAVA:'java.lang.String') D pPgmName O CLASS(*JAVA:'java.lang.String') D pPgmType O CLASS(*JAVA:'java.lang.String') D pInfo O CLASS(*JAVA:'java.lang.String') D pLoopLevel 5I 0 value D pLoopIndex O CLASS(*JAVA:'java.lang.String') D pAlpha N value D pAlphaValue O CLASS(*JAVA:'java.lang.String') D pDecValue 5I 0 value D getError PR O EXTPROC(*JAVA: D 'CallRtvInfo': D 'getError') D CLASS(*JAVA:'java.lang.String') D getAlphaValue PR O EXTPROC(*JAVA: D 'CallRtvInfo': D 'getAlphaValue') D CLASS(*JAVA:'java.lang.String') D getDecValue PR 5I 0 EXTPROC(*JAVA: D 'CallRtvInfo': D 'getDecValue') */////////////////////////////////////////////////////////////////////// * Native methods */////////////////////////////////////////////////////////////////////// P callPgm B EXPORT D callPgm PI N D pRtvPgm O CLASS(*JAVA:'java.lang.String') D pPgmName O CLASS(*JAVA:'java.lang.String') D pPgmType O CLASS(*JAVA:'java.lang.String') D pInfo O CLASS(*JAVA:'java.lang.String') D pLoopLevel 5I 0 value D pLoopIndex O CLASS(*JAVA:'java.lang.String') D pAlpha N value D pAlphaValue O CLASS(*JAVA:'java.lang.String') D pDecValue 5I 0 value D wRtvPgm S 10A D wPgmName S 10A D wPgmType S 10A D wInfo S 5A D wLoopLevel S 5S 0 D wLoopIndex S 250A D wAorD S 1A D wAlphaValue S 256A D wDecValue S 5S 0 D wError S 60A D* D* Prototypes. D* D makeString PR O EXTPROC(*JAVA: D 'java.lang.String': D *CONSTRUCTOR) D CLASS(*JAVA:'java.lang.String') D wParm 256A const varying D* D crtString PR O EXTPROC(*JAVA: D 'java.lang.String': D *CONSTRUCTOR) D CLASS(*JAVA:'java.lang.String') * D getBytes PR 256A EXTPROC(*JAVA: D 'java.lang.String': D 'getBytes') VARYING * D getLength PR 10I 0 EXTPROC(*JAVA: D 'java.lang.String': D 'length') /free wRtvPgm=getBytes(pRtvPgm); wPgmName=getBytes(pPgmName); wPgmType=getBytes(pPgmType); wInfo=getBytes(pInfo); wLoopLevel=pLoopLevel; wLoopIndex=getBytes(pLoopIndex); wAlphaValue=getBytes(pAlphaValue); wDecValue=pDecValue; wError=*blanks; if (pAlpha=*ON); wAorD='A'; else; wAorD='D'; endif; /end-free c call wRtvPgm 90 c parm wPgmName c parm wPgmType c parm wInfo c parm wLoopLevel c parm wLoopIndex c parm wAorD c parm wAlphaValue c parm wDecValue c parm wError c if *in90=*on c eval wError='Program '+wRtvPgm+' has failed.' c end /free fAlphaValue=makeString(wALphaValue); fDecValue=wDecValue; if (wError<>*Blanks); fError=makeString(wError); return *ON; else; fError=crtString(wError); return *OFF; endif; /end-free P callPgm E P getError B EXPORT D getError PI O CLASS(*JAVA:'java.lang.String') /free return fError; /end-free P getError E P getAlphaValue B EXPORT D getAlphaValue PI O CLASS(*JAVA:'java.lang.String') /free return fAlphaValue; /end-free P getAlphaValue E P getDecValue B EXPORT D getDecValue PI 5I 0 /free return fDecValue; /end-free P getDecValue E _______________________________________________ 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/cgi-bin/listinfo/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.