RATE THIS ANSWER
0
Click to Vote:
0
0
Make sure your program includes the binding directory that holds the service program. If you are calling the program form CL then the binding directory will be added during the CRTPGM. If you are using RPGLE then you will put it in the H specs. (HBNDDIR('my_bibding_directory').
Then call the API passing the required parms.
Look at http://code.midrange.com/47dbe785ac.html for calling it using a service program and
http://www.think400.dk/apier_3.htm#eks0017 for calling the API outside of the service program.
-------------------------------------------------------
You need to code the 'D' specs related to the prototype for the API.
You do not need to code the 'D' specs related to the formats supported by the API. These D specs can be included into your source program. Format definitions can be found in source file QRPGLESRC of library QSYSINC if you have option 13 of the i operating system installed on your system. For *SRVPGM bound APIs the name of the source file member is the name of the *SRVPGM. That is, you want to copy in the source found in QSYSINC/QRPGLESRC,QJOURNAL.
You do not need to reference the *SRVPGM when compiling your RPGLE program. The system provides a binding directory (QUSAPIBD) which is implicitly used by the operating system when binding ILE programs. The system binder will automatically find the QJOURNAL *SRVPGM for you.
Some of this information can be found
here.
Bruce Vining
Bruce Vining Services
Last Answered:
Sep 16 2009 2:19 PM GMT by Bvining 
4885 pts.
Latest Contributors: Teandy
3250 pts.