Page 1 of 1

Error while compiling program

Posted: Sat Apr 16, 2022 6:16 pm
by maulsays
hello, im very new to rpg, i just started using it about 2 weeks

i tried to recreate an example http-post program in my own library. i also follow the step in this video https://youtu.be/N9NqeBEGJcA
but when i compile the program,i got these errors:


"Errors were found during the binding step. See the job log for more information."
"Program 'program name' in library 'libname' not created."

how can i fix this?

thank you for any help

Re: Error while compiling program

Posted: Sat Apr 16, 2022 6:18 pm
by Scott Klement
Take a look at the job log. After your compile command there will be a list of errors that occurred. What are they?

Re: Error while compiling program

Posted: Sat Apr 16, 2022 9:44 pm
by maulsays
it says, binding directory HTTPAPI in library *LIBL not found, how can i fix that?

i also tried
Build & run the install program:
CHGCURLIB CURLIB(LIBHTTP)
CRTCLPGM INSTALL SRCFILE(LIBHTTP/QCLSRC)
CALL INSTALL

and the job log return error "Not authorized to process request on member CONFIG_H."

but i still can make a run of example program with "call libhttp/example4"

Re: Error while compiling program

Posted: Sat Apr 16, 2022 11:03 pm
by jonboy49
The message is telling you that LIBHTTP is not in your library list. So the simple solution is to add it.

ADDLIBLE LIBHTTP

Then try the compile again.

The binding directory HTTPAPI is used to allow the compiler to find all of the service routines needed by HTTPAPI. On the H spec or Ctl-Opt at the start of your program you probably have BNDDIR(HTTPAPI) specified. That is the easiest way to ensure that the compiler can find what int needs.

Re: Error while compiling program

Posted: Sun Apr 17, 2022 1:15 am
by Scott Klement
maulsays wrote: Sat Apr 16, 2022 9:44 pm it says, binding directory HTTPAPI in library *LIBL not found, how can i fix that?
See Jon's response -- you need to add it to your library list.

Advice: I have taught a lot of people who are new to the platform, and library list is one of the concepts that people struggle with the most. Take some time, ask an experienced co-worker to spend some time with you, and make sure you get a good grasp on it. This will be a huge help when using this platform, because the library list is used just about everywhere.
maulsays wrote: Sat Apr 16, 2022 9:44 pm and the job log return error "Not authorized to process request on member CONFIG_H."
This means that you don't have enough authority/permission to update the HTTPAPI configuration. My guess is that you only have read authority (*USE) to the file and not write authority (*CHANGE). That said, I wonder if you need to run this program? Which brings me to your next question:
maulsays wrote: Sat Apr 16, 2022 9:44 pm but i still can make a run of example program with "call libhttp/example4"
The fact that this works when the call to INSTALL received an error implies to me that someone has already run INSTALL on your system, and it is already set up and configured for your environment. Is that true? If so, you shouldn't need to run it again.

The main thing is the library list. See Jon's post about how to resolve it.

Re: Error while compiling program

Posted: Sun Apr 17, 2022 5:18 am
by maulsays
jonboy49 wrote: Sat Apr 16, 2022 11:03 pm The message is telling you that LIBHTTP is not in your library list. So the simple solution is to add it.

ADDLIBLE LIBHTTP

Then try the compile again.

The binding directory HTTPAPI is used to allow the compiler to find all of the service routines needed by HTTPAPI. On the H spec or Ctl-Opt at the start of your program you probably have BNDDIR(HTTPAPI) specified. That is the easiest way to ensure that the compiler can find what int needs.
works perfectly. thank you for your help and expalanation

Scott Klement wrote: Sun Apr 17, 2022 1:15 am
maulsays wrote: Sat Apr 16, 2022 9:44 pm it says, binding directory HTTPAPI in library *LIBL not found, how can i fix that?
See Jon's response -- you need to add it to your library list.

Advice: I have taught a lot of people who are new to the platform, and library list is one of the concepts that people struggle with the most. Take some time, ask an experienced co-worker to spend some time with you, and make sure you get a good grasp on it. This will be a huge help when using this platform, because the library list is used just about everywhere.
maulsays wrote: Sat Apr 16, 2022 9:44 pm and the job log return error "Not authorized to process request on member CONFIG_H."
This means that you don't have enough authority/permission to update the HTTPAPI configuration. My guess is that you only have read authority (*USE) to the file and not write authority (*CHANGE). That said, I wonder if you need to run this program? Which brings me to your next question:
maulsays wrote: Sat Apr 16, 2022 9:44 pm but i still can make a run of example program with "call libhttp/example4"
The fact that this works when the call to INSTALL received an error implies to me that someone has already run INSTALL on your system, and it is already set up and configured for your environment. Is that true? If so, you shouldn't need to run it again.

The main thing is the library list. See Jon's post about how to resolve it.
thankyou for the insight and explanation. i already try jon post and it work

again, thank you for helping me with this noob question. have a nice day