|
I thought of that but that's not my problem. This is how by code looks like. 0008.02 D SITEM_isItemFinishedGood... 0009.00 D PI 1A 0010.00 D P_CompNbr 3 0 Const 0010.01 D P_ItemNbr 12A Const 0010.02 D P_ErrorMsg LikeDs(@DS_ErrMsg) 0010.04 * 0010.08 *---------------------------------------------------- 0010.09 * FIELDS DEFINITION 0010.10 *---------------------------------------------------- 0010.12 * Variables........... 0010.13 D W#InvComp S 3 0 0010.14 D W#WrkInvCo S 3A 0010.15 D w#TableName S 4A -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Cozzi Sent: Thursday, September 08, 2005 10:02 AM To: 'RPG programming on the AS400 / iSeries' Subject: RE: LikeDS in Subprocedure You probably have a stand-alone field just after the input parameter list (which you did not show us in your example) and you probably forgot to put the "S" in column 24 to indicate that it is standalone. Hence the compiler doesn't know where the end-of-parameter list is, and therefore thinks this extra field is also a parm. But yet the prototype, which is separate, has 3 parameters, therefore the procedure Interface does not match the prototype. Probably something like this: P SITEM_isItemFinishedGood... P B Export * D SITEM_isItemFinishedGood... D PI 1A D P_CompNbr 3 0 Const D P_ItemNbr 12A Const D P_ErrorMsg LikeDs(@DS_ErrMsg) D SOMEOTHERFIELD... D 10A The "someotherfield" is probably missing the "S" in column 24 in your code. Happens a lot... Having said that... < rant> always put prototype parameter name in your prototype. How the hell can someone know what to put into the parameter when they're calling it if there are no parameter names? It is ironic that you use "SITEM_isItemFinishedGood" as your procedure name, and nothing for the prototype parameter names. When you created the prototype, didn't you just clone the Procedure Interface source? If so, that would mean you had to pro-actively remove the parameter names. Oh and one last thing... please avoid using # @ $ in field/data structure/procedure names--it shows laziness in my view. </rant> -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wall, Isa (ED) Sent: Thursday, September 08, 2005 8:38 AM To: rpg400-l@xxxxxxxxxxxx Subject: LikeDS in Subprocedure I am creating a subprocedure and want to send an error data structure as a parm. Below is a sample of what I coded but is not compiling. Can anyone help? I don't know what I am doing wrong. Thanks. DSITEM_isItemFinishedGood... D PR 1A D 3 0 Const D 12 Const D LikeDs(@DS_ErrMsg) * * Error Message Data Structure D @DS_ERRMSG DS QUALIFIED D @Error_Code 1a D @Error_Desc 50a P SITEM_isItemFinishedGood... P B Export * D SITEM_isItemFinishedGood... D PI 1A D P_CompNbr 3 0 Const D P_ItemNbr 12A Const D P_ErrorMsg LikeDs(@DS_ErrMsg) This is the error message I'm getting. Too many parameters specified in the procedure interface; extra parameters ignored. Code, code, code.... P SITEM_isItemFinishedGood... P E Isa Wall Programming Manager Everglades <http://www.gneil.com/> Direct, Inc. 720 International Parkway Sunrise, FL 33325 * 954-514-2259 * 954-851-1201 Fax * iwall@xxxxxxxxxxxxxxxxxxxx
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.