i prefer QCMDEXC over system() for better error messaging (and handling)
JMO. but for query functions in RPG I'd opt for embedded SQL over any
RUNQRY, CRTQMQRY, etc. if you build the SQL statement dynamically you
could always dump the statement into a data area, file, user space, etc
for your perusal later.
03/05/2008 08:10 AM
Re: Error while calling QCMDEXC API
I don't think that Srinivas places much value on OUR time, and I'm
relatively confident that he did NOT read (as I suggested) Eric Raymnond's
"How To Ask Questions The Smart Way" page (
). I don't mind helping
rookies who first try to help themself - and I think Srinivas wants to
shortcuts and have us do his homework for him.
I would have first tried to find EVERY command related to queries:
For example, typing the command GO CMDQRY would show a menu of all
query-related commands, then I would explore those commands.
And by the way, I DON'T use QCMDEXC to execute commands from RPGIV
programs...I prefer the C runtime library 'system' function, which doesn't
require a length:
But what do I know? I'm not one of the 'best and the brightest' young
Indians that Bill Gates is currently lobbying Congress to increase the
limit to make unlimited - I'm just a 56-year-old self taught RPG
with bachelors and masters degrees...