Error in compilation of RPG Program


I am trying to compile this RPG program but it keeps hitting error as below and it say that it cannot be complied because the binding directory . TQ


Error as below from job log as below

    Comments  . . . . . . . . . . . :     2134                        
         * * * * *   E N D   O F   F I N A L   S U M M A R Y   * * * *
                 B i n d   D i a g n o s t i c   M e s s a g e s      
Errors were found during the binding step. See the job log for more inf
 * * * * *   E N D   O F   B I N D   D I A G N O S T I C   M E S S A G
Program FILE in library MYLIB not created.          
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Theo KouwenhovenApplication ConsultantCommented:
Please try to compile this program interactively with:

If not succesfull, please post your compiler-listing here.

Gary PattersonVP Technology / Senior Consultant Commented:
Please post the job log from the failed compile.  

Creating a bound RPG involves two steps.  First, the current module gets compiled.  Second, and references to other modules (including modules bound into service programs) get resolved.  The binding error indicates that the module probably compiled successfully, but binding failed.  You probably need to specify a binding directory in your program H specs or in the CRTBNDRPG command so that the linker can find external procedures that you referenced in the program.

You can check this by using the CRTRPGMOD command (interactive or batch) to create a module (CRTBNDRPG does this under the covers), and check to see if module creation is successful - you'd get a MODULE object.

Then use the CRTPGM command interactively to bind your module with any other required modules or service programs.  If it fails just display your job log (DSPJOBLOG) and look at the detailed error messages - odds are it will tell you exactly what the problem is.  Then you just need to figure out where the missing reference is located, and reference the correct binding directory, service program, or module when you create your program.

-Gary Patterson

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary's right. The compile listing indicates that the error should be found in the joblog wherever the compile was run. Without the error from the joblog, there's no way to know what the problem is.

Technically, it might also be possible to guess the problem from seeing the entire source listing. For example, you might have a call to a procedure that could be found in the QC2LE binding directory and that's not shown on your CRTBNDRPG command. Similar possibilities might also be visible.

But the joblog should give a specific message.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.