Is it possible to use external indicator to activate display attribute in display file?

删除回忆录丶 提交于 2019-12-12 17:15:09

问题


I am currently amending an existing RPG program. The aim is to set on an indicator so that this indicator will activate the display attribute ND in a display file to hide a field. The problem is that all the general purpose indicators IN01~IN99 have been used up, and I cannot reuse any of them without disturbing the existing program flow. Is it possible to use external indicator U1~U8 instead? If not possible is there any other alternative? Or am I just screwed?


回答1:


Consider using a program to system field instead of an indicator. http://wiki.midrange.com/index.php/Program_To_System_Fields

Another possibility is to externalise all the display file indicators via the DDS keyword INDARA http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzakc%2Frzakcmstdfindar.htm




回答2:


Check the usage of each indicator 01-99, to determine if you might be able to free them up for use in your dislay file.

IF any of them are only used to control the program flow, and not directly involved in display files, print files, I-specs, or O-specs, THEN you may substitute its use with an indicator-type variable. Declare a variable with an internal data type of N (position 40 of your D-spec) as a character indicator-format field. Use this variable in place of an indicator that is used only for program flow control.

If there are no such indicators, then you should probably use one of the methods Buck recommended.

An old-style alternative, you could save the entire indicator array *IN to a holding area, re-use some of the I/O indicators temporarily, then plop the holding area back onto the indicator array. You might have multiple 99-indicator structures that you move to *IN, or load from *IN, at the appropriate time. You could have one such structure for each record format which you would move to *IN right before I/O on that record format, and load back after the I/O. This gives you an almost infinite number of indicators in your program, although still limited to 99 per display format.



来源:https://stackoverflow.com/questions/11649945/is-it-possible-to-use-external-indicator-to-activate-display-attribute-in-displa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!