I don't agree with the previous poster regarding the different names. A prototype is telling the system the details of the parameters that are being passed. You can use any name you like on a prototype as they aren't actually used (they're only used to help describe the field - you don'have to add a name) - it's the parameter lengths that are important there.
The procedure interface defines the variables that are used in your program that are passed as parameters. The lengths in the PR need to match your PI definitions. As such, I'd recommend using the LIKE keywords to define the prototype definitions where possible e.g.
D CSG1000012 PR
D idparm Like(masterid#p)
D CSG1000012 PR
It's difficult to assist much as the errors you have shown are just the generic errors from the end of the compiler listing. If you look at the end of the source code in this listing, you'll get more details on the specifics of the errors.
The first error message is saying the prototype is not defined. Is it definitely this particular prototype? In the compiler listing, are any errors shown below the prototype definition?
For "the name or indicator is not defined" error - the compile listing should say which name is not defined after the source listing. That could be anything as it could be the result of a typo. Note though, you have added names to the prototype but this is not defining variables so they need to be defined elsewhere. As per my previous comment, using LIKE in the prototype means you only need to define the lengths/types in one spot.
The error is definitely for this prototype, the prototype is called twice. These are the detailed error messages.
*RNF7030 30 023601 The name or indicator MDJ is not defined.
*RNF7503 30 023601 Expression contains an operand that is not defined.
*RNF7503 30 024700 Expression contains an operand that is not defined.
*RNF5410 30 024500 The prototype for the call is not defined.
*RNF7503 30 037000 Expression contains an operand that is not defined.
*RNF7503 30 054001 Expression contains an operand that is not defined.
*RNF7503 30 056301 Expression contains an operand that is not defined.
*RNF5410 30 056100 The prototype for the call is not defined.
Line 024500 and 056100 are the call to the prototpe.
024500 callp StatsCRUD(masterid#:castype:atty:start:plead:money:
I have this error in the compiled listing:
*RNF7030 MDJ **UNDEF** 023900M 025000 036700 053300M
MDJAPEALERR N(1) 005400D 034300M 039400M 044800M
MDJ is clearly defined in the compile listing though:
003600+d found n
003700+d mdj 1a