× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Michael

Thanks,
it's getting a little late in the evening so I (hopefully) will try your
CMD tomorrow.
Just a quick one though,
The CMD Analyzer Exit PGM is indeed called so the API does seem to work.

Gad

On Mon, Jan 25, 2016 at 8:28 PM, <MichaelQuigley@xxxxxxxxxx> wrote:

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
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.