subfile in RPGLE
750 pts.
0
Q:
subfile in RPGLE
i have indicator to show fields in a row red in subfile...

when i select some option say 5 - view against this row, it displays necessary details. now affter dispalying this when i return back to existing screen, i update SFL to make the selected option 5 blank, and redisplay the file.....however this time it doesnt display that row in red as previous....

in debug when i check the indicator it is set off automatically...

is there any way to retain the value of color indicator 

if i dont blank the optin 5, the row is correctly displayed in red..but i have to blank this 5 before i redisplay my subfile.

Please help.

-NG



Software/Hardware used:
AS400 - RPGLE
ASKED: Sep 21 2009  10:23 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
865 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
You need to again check for conditions which make it Red or normal, and before updating subfile record with option as blank you need to set that color indicator as *On.

Umesh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
There is also an alternative to the indicator use to set the display attribute. You can specify in your DDS for a field DSPATR(&ATTRFLD). This way when you update the subfile record you will not have to bother you with how the record was displayed, it will still be as it was set in the record used for update.

Peter
Last Answered: Sep 23 2009  8:50 AM GMT by Pdraebel   865 pts.
Latest Contributors: Umeshprataps   15 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

YuVa47   280 pts.  |   Sep 23 2009  1:31PM GMT

Another way is to save the indicator in a work-field before you clear the option 5 and move the work-field indicator back before you write to the sub-file. Something like this:

#Inwk = *in50 // red line indicator

 do what you want here…

*in50 = #Inwk
write subfile

 

Vatchy   670 pts.  |   Sep 24 2009  2:23PM GMT

The indicator is not set off automatically - the program sets it off after the record is written so that all following records are not set to red if they needn’t be. One way to take care of this is to define a hidden field in the subfile record and copy the red indicator into that field when you write the record. When you need to re-write the record just copy the hidden field to the indicator.

 
0