About CRTPGM command

335 pts.
Tags:
AS/400
CRTPGM
I have a module which has a copy book in it and when I am creating a main PGM with the command CRTPGM by giving the module name itself as the PGM name and binding the service programs, I am getting an error which says that the procedures which are defined in the copy book are not defined. How to resolve the error? Do I need to add the copybook anywhere? If so could you please let me know where I need to add it?

Software/Hardware used:
iseries/as400

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: 1  Reply

 
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
  • TomLiotta
    If you're using CRTPGM and procedures are copied via a COPY statement, the COPY statement should be irrelevant. The module would have to be previously compiled with CRTRPGMOD, the copied procedures would already be included.   The alternative would be that the COPY is only copying procedure prototypes and not copying the procedures at all. That's a much more likely case. The procedures are most likely in a different module. Assuming that the module (or modules) is also already compiled, then it must be listed as a second (or third or more) module in the MODULE() parameter list.   If not listed explicitly, additional modules might be included through inclusion of the service program that contains the procedures in the BNDSRVPGM() parameter; they might be defined with binder language and referenced through the BNDDIR() parameter.   If this additional module (or modules) is included in more than one program, then it should be part of a service program.   In general, entire procedures shouldn't be included with COPY statements. So some additional module is probable.   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