Indeed RDi does simply invoke the CRTBNDRPG/CRTRPGMOD/etc. commands. But
unfortunately it does this within the QRSEEXEC program which runs in
*SYSTEM state. The command analyzer APIs are not called in that case.
I know this would require modifying each developers installation (sounds
like a case for 'Push to client'), but you can try it as an experiment.
Here's a simple command RDIEXEC and CL RDIEXECP to try it:
CMD PROMPT('RDI Execute Command') TEXT('RDi Execute +
Command')
PARM KWD(CMD) TYPE(*CHAR) LEN(5000) MIN(1) VARY(*YES +
*INT4) CHOICE('Command string') INLPMTLEN(512) +
PROMPT('Command to execute')
Create the command with:
CRTCMD RDIEXEC PGM(RDIEXECP) SRCFILE(yoursourcefile)
PGM PARM(&CMDPARM)
DCL VAR(&CMDPARM) TYPE(*CHAR) LEN(5000)
DCL VAR(&CMDLEN) TYPE(*INT) LEN(4) +
STG(*DEFINED) DEFVAR(&CMDPARM 1)
DCL VAR(&CMD) TYPE(*CHAR) LEN(4996) +
STG(*DEFINED) DEFVAR(&CMDPARM 5)
DCL VAR(&QCMDEXCLEN) TYPE(*DEC) LEN(15 5)
DCL VAR(&QCMDEXCCMD) TYPE(*CHAR) LEN(4996)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(512)
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)
CHGVAR VAR(&QCMDEXCLEN) VALUE(&CMDLEN)
CHGVAR VAR(&QCMDEXCCMD) VALUE(%SST(&CMD 1 &CMDLEN))
CALL PGM(QCMDEXC) PARM(&QCMDEXCCMD &QCMDEXCLEN)
MONMSG MSGID(CPF0000)
RCVMSG MSGTYPE(*LAST) MSGDTA(&MSGDTA) MSGID(&MSGID) +
MSGF(&MSGF) SNDMSGFLIB(&MSGFLIB)
SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) MSGDTA(&MSGDTA)
RETURN
ENDPGM
Create the program with:
CRTBNDCL RDIEXECP SRCFILE(yoursourcefile)
In RDi, open whatever you want to compile, click on 'Compile', then
'Compile' from the sub-menu, then 'Work With Compile Commands...'
Give the command a label like 'Execute Command', the command should then
be (for a bound RPGLE program) 'RDIEXEC CMD(? CRTBNDRPG &O/&N
SRCFILE(&L/&F) OPTION(*EVENTF)) /* DBGVIEW(*SOURCE) */
Specifying OPTION(*EVENTF) will allow the compiler to populate the
necessary information for the RDi Error List. I've appended a comment of
DBGVIEW(*SOURCE) which I believe is also required for RDi to properly
process the compile. I've prefixed the basic command with a question mark
which will cause the actual compile command to always be prompted. You may
not want that in a production set up, but this should quickly tell you
whether your CMD analyzer exit program is being called.
The whole process could be developed a lot further, but this at least
tests the concept. (RDIEXECP should run under *USER state and therefore
the CMD analyzer should be called.) I would test it here, but I don't have
the authority to register the required exit points. If the concept works,
I could probably get our administrator to buy into it and handle the
registration for me.
I hope this helps,
Michael Quigley
Computer Services
The Way International
www.TheWay.org
"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 01/23/2016 01:00:02 PM:
----- Message from Gad Miron <gadmiron@xxxxxxxxx> on Sat, 23 Jan
2016 16:38:36 +0200 -----
To:
"Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
Subject:
Re: [WDSCI-L] RDi Compile and CMD Analyzer
Thanks you all guys
I followed your advice regarding the Compile on-line,
RDi now compile on-line all right but the issue with the CMD Amalyser
Pre
compiler
is not solved.
Way back when I devised the CMD Analyzer method I just could not fathom
all
the parameters involved in CRTBNDRPG or CRTRPGMOD (and I wanted the
programmers to use the CMDs they are familiar wthh) so I looked around
for
another way and with the help of Bruce Vining managed to use the CMD
Analyzer.
I thought (wrongly I guess) that RDi simply invokes the
CRTBNDRPG/CRTRPGMOD
so naturally I expected this thing to work.
Well, back to the drawing board.
Thanks again
Gad
As an Amazon Associate we earn from qualifying purchases.