Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1270403
  • 博文数量: 287
  • 博客积分: 11000
  • 博客等级: 上将
  • 技术积分: 3833
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-16 08:43
文章分类
文章存档

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2009-04-25 09:13:57

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.
阅读(803) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~