compilationibm-midrangerational-developer-for-i

How to make IBM Rational Developer for Power IDE retrieve error list automatically?


I am currently working on a task to exploit the iProject Remote Build functionality of Rational Developer for Power (RDP) IDE for AS/400 related objects. I am developing a customized compilation utility, which is a generic tool to compile different source members, e.g. RPGLE, CLLE, PF. It is a command which accepts the source member, the source file, the source library and the target library as parameters. It is going to compile the specified source member and place the created object into the target library. Inside it the actual compilation is done using QCMDEXC API, with the compilation command set up as input parameter. It works fine on AS/400. Now I need to make it work on RDP directly with iProject Remote Build capability. Meanwhile any error generated should be automatically loaded to the Error List view after the compilation. I am aware the fact that Option(*EVENTF) must be included in order to generate the event file. But how to make RDP load it? The compilation utility is a command called CPLOBJ. Using source member A in file B in library C to create object A in library D is something like this: CPLOBJ SERMBR(C/B/A) LIBRARY(D).


Solution

  • See if this old article helps: http://www.itjungle.com/fhg/fhg080404-story01.html

    Basically, the link between RDP and the compiler is through the event file. The compiler won't produce an event file unless you tell it to. Most compiler commands allow OPTION(*EVENTF) which is how you tell the compiler to create an event file. Your custom compile command needs the same parameter. It must also have a SRCMBR() parameter. So your custom compile command will need to look something like this:

    COMPILE SRCMBR(nnnnn) OPTION(*EVENTF)

    ...and it will pass these values on to the IBM compile command.

    Because you are using QCMDEXC to execute the IBM compile command (the one that actually generates the event file) you will need an additional step. You need to tell RDP that the compile completed and the event file is ready. This happens by placing the event file library and member name in the local data area. The library name goes in columns 1-10 and the member name in 11-20.