Hi Patrik

It would appear you do need to deal with hex values - but, as that article offers, do it once, give each item a name, there you are for the future.

Someone even suggested using BITOR - the protected state is set with the leftmost bit, which is 8 in the first nybble - so BITOR x'80' with the unprotect values, you have cut things in half.

And with BITOR, you don't need to deal with hex values - everything can be done with single byte integers, or int(3) in RPG. So to get the protected condition, use BITOR(128).

I know, my syntax is probably very incorrect, but I do hope the idea comes across. Here's another "bit" to think about - to a certain extent, it seems there are 3 bits that control RI, HI, and UL - at least in GREEN. That's 1, 2, and 4, resp. You "add" them up, or BITOR them, to get combinations. So RI HI is 3. ND is 7. Some of these end up with different colors - that's how BLUE and PINK are kind of connected. likewise, TURQUOISE and YELLOW. And the difference between the colors, except for RED, seems mostly to be 2 - so I see opportunites for simplifying all this, not needing to list all the possible combinations, rather, to use sets of attributes.

Okay, enough, but it'd be about getting set up, then it'd be pretty clean going therefrom, eh?

*Regards*

*Vern Hamberg*

IBM Champion 2025 <cid:part1.ywsd98sN.UsLCr7M0@centurylink.net> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023

On 7/9/2025 3:35 AM, Patrik Schindler wrote:
Hello,

I have a display file containing a subfile which I use to show a calendar for one year on screen. Each month is one record (line) in the SFL, and the fields are named according to month days (DF_DAY01 to DF_DAY31).

I'm using one indicator per field to mark it DSPATR(RI) for the current day. This works like expected, but eats up 31 indicators.

Now I want to add "mark Sunday red". Can't use more indicators, and remembered there were "program to system fields". So I redefined the individual fields for one month, adding

COLOR(&CO_DAY01)

And after the SFL displayed fields, I added

A CO_DAY01 3A P

Won't compile: CPD7494, Keyword ignored because of error in list of values.

The DDS reference does not state if program fields are allowed or not for the COLOR keyword.

Note, I'm on V4R5, but I'm getting the same compile error on 7.3.


Found this one:

https://www.rpgpgm.com/2013/10/condition-display-fields-without.html

Seriously? Do I need to fiddle with hex values? Or do I overlook something in my field descriptions?

Thanks for your thoughts!

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.