how to change output mode to input mode (fields)in updating the database file using rpgle as400

883 views Asked by At

I've written a program in #rpgle along with the 2 records work screen in display file.

First record will display the main-screen-of-company, which takes input as:
emp id indicators= f3: exit f6: accept.

After pressing the f6, it goes to the second record
indicators= f3: exit f12: cancel f7: modify f8: delete f6: accept
& fields are in output mode.

When I press f7 to update the fields, which are in o/p non editable mode should get change into editable mode.

How to do that?

1

There are 1 answers

1
Jairo R. Flores On

Try protecting the field with the same indicator associated to the function key.

A          R REC001                    TEXT('Record') 
A                                      CF07(07)                    
A            FIELD    R        B 10  3                            
A N07                                  DSPATR(PR)