FWIW, consider using "MLTCHCFLD (Multiple-Choice Selection Field)
keyword for display files" (check boxes) for a screen with 60 choices.
Much easier to layout, and much easier to deal with. Check boxes are
entirely mousable.
Here's how they look:
http://www.martinvt.com/Code_Samples/Multi_Windows/multi_windows.html
or
http://www.martinvt.com/Subfiles/Two_Subfiles/two_subfiles.html
Circles are radio buttons, squares are check boxes.
If you can, find a way to use RPG - much easier.
On 1/4/2013 8:32 AM, Vidal, Peter wrote:
GM list!
I have seen this issue explained before but I do not know how to describe it better than giving you an example about it.
I have 60 fields on a single screen. All of the fields start with the prefix "MEMBER" and they have a numeric suffix between 01 and 60. I want to use a DOFOR to check all of them and turn on a flag whenever I find one of these fields with some content in it. I would like to do something like this:
DCL VAR(&COUNTER) TYPE(*INT) LEN(2)
DCL VAR(&CNTR) TYPE(*CHAR) LEN(2)
DCL VAR(&MEMBER) TYPE(*CHAR) STG(*AUTO) LEN(10)
DCL VAR(&MEMBER_FLG) TYPE(*LGL) STG(*AUTO) LEN(1)
.
.
.
CHGVAR VAR(&MEMBER_FLG) VALUE('0')
DOFOR VAR(&COUNTER) FROM(1) TO(60) BY(1)
CHGVAR VAR(&CNTR) VALUE(&COUNTER)
CHGVAR VAR(&MEMBER) VALUE('MEMBER' || &CNTR)
IF COND(&MEMBER *NE ' ') THEN(DO)
CHGVAR VAR(&MEMBER_FLG) VALUE('1')
ENDDO
ENDDO
Obviously this will not work, but is the idea of what I am trying to accomplish. Same thing if I have 60 indicators (from 01 to 60) on this display and I would like to turn them all off without doing:
CHGVAR VAR(&IN01) VALUE('0')
CHGVAR VAR(&IN02) VALUE('0')
CHGVAR VAR(&IN03) VALUE('0')
Etc., etc., etc. ...
Thank you for your advices in advance!
Peter Vidal
________________________________
This communication is intended only for the use of the individual or entity named as the addressee. It may contain information which is privileged and/or confidential under applicable law. If you are not the intended recipient or such recipient's employee or agent, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited. If you have received this communication in error, please immediately notify CareCentrix Compliance Hot Line at (877) 848-8229 and notify the sender by electronic mail. Please expunge this communication without making any copies. Thank you for your cooperation.