Prototype Mismatch error when using a datastructure field

15 pts.
Tags:
datastructure
Procedure
Hi,

I am facing a issue when I am using a datastructure field as a parameter for a Procedure call. This issue came up when I made a data structures having Screen fields as its subfiled (All the subfield of the data structure below is of a screen field and each have dimension 5Y 0).

D Dssaved_Iwxxdr  DS D IwRDR#_A                  OVERLAY(Dssaved_Iwxxdr:1)    D IwADMD_A                  OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwATDR#_A                 OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwDISCPHYS_A            OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwERPHYS_A               OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwTDR#_A                  OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwMD01_A                  OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwMD02_A                  OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwAFLDR1_A               OVERLAY(Dssaved_Iwxxdr:*NEXT) D IwAFLDR2_A               OVERLAY(Dssaved_Iwxxdr:*NEXT)

Earlier when the Datastructure is not defined and I was using the screen field in the Procedure call I was not facing any issues and the program is behaving perfectly. But as soon as I defined the Datastructure I am getting the following error while compilation: "The type and attributes of the parameter do not match those of the prototype." the Prototype of the Procedure is

DPrc_get_Doctor   PR            25a               D swhsp#                              LIKE(QLHSP#) D swDr#                               LIKE(MRDR#)

The second parameter is of 5P 0. Please suggest what needs to be done.

Thanks, Parmendra



Software/Hardware used:
AS/400 V6R1

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BigKat
    it is because the DS as you have defined it is 50 characters long.
    7,935 pointsBadges:
    report
  • TomLiotta
    But as soon as I defined the Datastructure I am getting the following error while compilation: "The type and attributes of the parameter do not match those of the prototype." What statements gets that error? What does that statement look like? If it is a CALLP statement, what are the definitions of the variables that you referenced in the statement? So far, nothing in the question seems related to the error. We need to see how the error relates to your definitions, and for that we need to see the statement that triggered the error. Tom
    125,585 pointsBadges:
    report
  • Param17
    Tom, It gives a compilation error on all the CALLP statement for the Procedure Prc_get_Doctor for the second parameter. I am using the subfields of the datastructure as the second parameter. The Subfields are of a display file having dimension 5Y 0. the Second parameter of the Procedure in the prototype is 5P 0. When I am not defining the datastructure it is working fine.
    15 pointsBadges:
    report
  • TomLiotta
    It gives a compilation error on all the CALLP statement for the Procedure Prc_get_Doctor for the second parameter. Again, "What does that statement look like?" We need to see what the code looks like in order to know how it should be changed. However, you might be able to see where things are going wrong by looking at the compiler listing to see how the variable is defined. Look at the end of the listing, perhaps under the section labeled 'Global Field References:' for the variable that is used in the CALLP. Look at its attribute definition and see if it shows as a packed value. I can't say exactly what to look for because the code isn't shown yet. I assume that MRDR# would have a P(5,0) definition because you say the parm ought to be "5P 0". It's very likely that whatever you are using in the CALLP is something other than P(5,0). Perhaps it shows as S(5,0). Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following