Color within a subfile field

2550 pts.
Tags:
AS/400
Subfile
I saw that BITON can enable coloring an area within a subfile field. Can anyone post an example ? I'll keep researching and will likely figure it out ... this seemed like it could be a fun discussion to post.

Answer Wiki

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

What are you looking to color, the field, part of the field the background color?  Most of those can be done in the DDS. We do something like that for color coding our order types. This is what the DDS looks like

A*  FMTS1 - Subfile record                                    
A************************************************************ 
A          R FMTS1                     SFL                    
A            S1REL          1A  B  6  3VALUES('X' ' ' 'V')    
A            S1ORD#         8S 0O  6  5                       
A  08                                  COLOR(RED)             
A  09                                  COLOR(BLU)             
A  10                                  COLOR(YLW)

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.
  • aceofdelts

    Some characters should be RED under certain conditions while the background should stay as-is.

    The subfile field is one long alpha with the alignment of values handled in the program.

    So it looks like I can append a Biton value before and after the target value. So far, I found '234' is Pink and '26' is White. The only Red reference I found says '28', but that can't be since there is no bit 8.


    2,550 pointsBadges:
    report
  • BigKat
            dcl-c #GRN const(x'20'); // Green
            dcl-c #GRN_RI const(x'21'); // Green/Reverse Image
            dcl-c #WHT const(x'22'); // White
            dcl-c #WHT_RI const(x'23'); // White/Reverse Image
            dcl-c #GRN_UL const(x'24'); // Green/Underlined
            dcl-c #GRN_UL_RI const(x'25'); // Green/Underlined/Rev
            dcl-c #WHT_UL const(x'26'); // White/Underlined
            dcl-c #ND const(x'27'); // Non-Display
            dcl-c #RED const(x'28'); // Red
            dcl-c #RED_RI const(x'29'); // Red/Reverse Image
            dcl-c #RED_HI const(x'2A'); // Red/Highlighted
            dcl-c #RED_HI_RI const(x'2B'); // Red/Highlighted/Reve
            dcl-c #RED_UL const(x'2C'); // Red/Underlined
            dcl-c #RED_UL_RI const(x'2D'); // Red/Underlined/Rever
            dcl-c #RED_UL_BL const(x'2E'); // Red/Underlined/Blink
            dcl-c #ND_2F const(x'2F'); // Non-display
            dcl-c #TRQ_CS const(x'30'); // Turquoise/Column Sep
            dcl-c #TRQ_CS_RI const(x'31'); // Turquoise/Column/Rev
            dcl-c #YLW_CS const(x'32'); // Yellow/Column Sep
            dcl-c #WHT_RI_CS const(x'33'); // White/Reverse/Column
            dcl-c #TRQ_UL_CS const(x'34'); // Turquoise/Underl/Col
            dcl-c #TRQ_UL_RI_CS const(x'35'); // Turqe/Underl/Col/Rev
            dcl-c #YLW_UL_CS const(x'36'); // Yellow/Underl/Col
            dcl-c #ND_37 const(x'37'); // Non-display
            dcl-c #PNK const(x'38'); // Pink
            dcl-c #PNK_RI const(x'39'); // Pink/Reverse Image
            dcl-c #BLU const(x'3A'); // Blue
            dcl-c #BLU_RI const(x'3B'); // Blue/Reverse Image
            dcl-c #PNK_UL const(x'3C'); // Pink/Underlined
            dcl-c #PNK_UL_RI const(x'3D'); // Pink/Underlined/Reve
            dcl-c #BLU_UL const(x'3E'); // Blue/Underlined
    9,410 pointsBadges:
    report
  • BigKat
    '28' is the HEX value, not the bit pattern
    9,410 pointsBadges:
    report
  • GregManzo
    If your subfile record is a single large alpha field, then to colour a single 'field' within you will need to put a x'28' (or other colour value) before it and a x'20' after it - otherwise the rest of the line will be in the same colour.
    2,895 pointsBadges:
    report
  • TheRealRaven
    Note that a trailing x'20' would be correct of it's what the field's leading attribute, as is most often the case. Otherwise it probably should match that leading attribute byte.
    31,805 pointsBadges:
    report

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.

Following

Share this item with your network: