Search code examples
ibm-midrangerpg

DSPATR(PR) in RPG program to protect the field


I'm developing RPG program on the IBM developing software

what happen is that I'm creating a display file with input field

I'm trying to accomplish one task.

If they already input all the field and the other record is display I want to protect the filed that they just input the value until they press enter

but I'm confuse how can I use the DSPATR(PR) to protect the field


Solution

  • I found answer for my question.

    To do this just go to properties on the screen designer > right click to properties and find keyword protect and this will protect the whole screen for the field that they enter until enter is pressed to unprotect.

    It's also can be done by adding DSPATR(PR) with indicator and add this to RPG to turn on the indicator for the required field.