40 pts.
 Dynamic DSPF by RPL program
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

Software/Hardware used:
ASKED: July 23, 2009  5:12 AM
UPDATED: August 4, 2009  8:43 PM

Answer Wiki:
You need to use a p-field to set the display attributes. see <a href="http://www.itjungle.com/fhg/fhg101304-story01.html">Anatomy of a P-field</a> also see <a href="http://search400.techtarget.com/tip/0,289483,sid3_gci1138843_mem1,00.html">Display attributes made easy</a> Hope this helps - BigKat
Last Wiki Answer Submitted:  July 23, 2009  1:23 pm  by  BigKat   7,185 pts.
All Answer Wiki Contributors:  BigKat   7,185 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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

 7,185 pts.

 

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 pts.

 

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′)

 5,525 pts.

 

Hi,

Thx to all of you.
I haven’t set the p-field bits correctly.
Now it is working well.

Golan
:-)

 40 pts.