RPG IV 编程问题百解(13)RPG调用QCMDEXC,损耗内存空间
问题:
I am using a prototyped QCMDEXC call to soft code application calls. The
process works very well but I have a concern that I would like to discuss.
Most of the applications that are called only have input paramaters; the RPG
program recieves the parm string sent by QCMDEXC and executes the application.
However there are some legacy applications that are coded to send back a
status message in the last parameter.
The status message is not evaluated by the calling application - it is just a
carryover from the old system. I added an extra blank ' ' space on the QCMDEXC
string for the 'output' status message paramater. The call works fine; no
exceptions are thrown even when the called application places a message in
the ' ' non-existent field; this however is never returned back to the calling
application, which is understandable as the cmdstring is coded as a constant
field.
The new application is going to be used by several hundred users runnig both
in batch and interactive modes. Will this behavior cause any type of memory
leaks or overflows when used multiple times in the same session? Has anyone
experienced problems in a similar environment?
解答:
"I am worried that the action of filling the last paramater by the called
program may be overwriting some other structure or memory space."
That is why you fill it to the full field length. QCMDEXC will not pass back
parameters to the caller, which is a reason why many of the RTVxxx commands
are not allowed in EXEC mode.
阅读(842) | 评论(0) | 转发(0) |