subfile in RPGLE

895 pts.
Tags:
AS/400 Subfiles
RPG/400 Subfile
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • YuVa47
    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
    
    
    1,300 pointsBadges:
    report
  • Vatchy
    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.
    1,410 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following