Dynamic DSPF by RPL program

40 pts.
Can I control DSPF field keywords, dynamically while running program. (e.g. set the field color to RED if user didn't fill the field). I don't want to use indicator. Thanks

Answer Wiki

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

You need to use a p-field to set the display attributes.

See Anatomy of a P-field.

Also see Display attributes made easy.

Hope this helps – BigKat

Discuss This Question: 5  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.
  • Golan
    Hi, Thx for address me to P-field. I followed the ‘Anatomy of a P-field’ page, compiled my files with no error, run but nothing happened. With debug mode I saw the hex value in the ‘nameAttr’ field but nothing happened. Do I need to enable the p-field in my system? Please advise Golan
    40 pointsBadges:
  • BigKat
    mmm, never had any problem with them. Double check your hex values, and make sure your setting the correct p-field assigned to your data field. If that doesn't help, can you post the DDS and the code where you set it before the exfmt
    9,460 pointsBadges:
  • SteveFletcher
    Hi Golan, In your program, before you write the display record (Write or Exfmt), you need to set the value in the P-field to the desired hex value of the color/attribute you want. Then, when it displays, it will use the color/attribute specified by that hex value. Good luck. Steve
    80 pointsBadges:
  • WoodEngineer
    One of our developers made extensive use of P-fields ( I asked him to avoid indicators). This is a partial example of code copied into all his programs that use display files. His program executes code similar to EVAL PFIELD1 = @GreenRI before writing the screen. Later if he needs to protect the field, EVAL PFIELD1 = @GreenPR then write the screen again. *************** Beginning of data ********************** 0001.00 * RI = Reverse Image 0002.00 * HI = Hi Intensity 0003.00 * BL = Blink 0004.00 * UL = Underline 0005.00 * ND = Non-display 0006.00 * PR = Protect 0007.00 * 0008.00 0009.00 d @Green c const(x'20') 0010.00 d @GreenRI c const(x'21') 0011.00 d @GreenHI c const(x'22') 0012.00 d @GreenRIHI c const(x'23') 0013.00 d @GreenUL c const(x'24') 0014.00 d @GreenULRI c const(x'25') 0015.00 d @GreenULHI c const(x'26') 0016.00 d @GreenND c const(x'27') 0017.00 d @GreenBL c const(x'28') 0018.00 d @GreenBLRI c const(x'29') 0019.00 d @GreenBLHI c const(x'2A') 0020.00 d @GreenPR c const(x'A0')
    8,225 pointsBadges:
  • Golan
    Hi, Thx to all of you. I haven’t set the p-field bits correctly. Now it is working well. Golan :-)
    40 pointsBadges:

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.

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


Share this item with your network: