ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RPGLE DSPATR(PR) situation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RPGLE DSPATR(PR) situation

    Hi, I have an indicator 81/ N81 set for DSPATR(PR) and DSPATR(UL) respectively in my display file record to protect some fields based on some condition. Now based on a different condition, I want to protect only 1 of the fields.

    If <condition1>
    Protect fld1, fld2, fld3,.... By setting *in81 to on
    Endif
    If <condition2>
    Protect only fld2
    Endif

    Please help, if there is a way to achieve the condition2.

  • #2
    If you add a second indicator to fld2 declaration in the display file, you can use an OR statement. The definition is over two lines, this will protect if either 81 or 82 is on.
    PHP Code:
         A  81
         AO 82                               DSPATR
    (PR
    Position 7 OR - https://www.ibm.com/support/knowledg...akc/pos716.htm

    Comment


    • Peter864
      Peter864 commented
      Editing a comment
      Thanks @Ghost. This is exactly what I was looking for. Thanks again for your quick response.
Working...
X