Try including the fields of FMT01 on your CTL2 screen and never write or process FMT01. (I have not tested this.)

On 12/11/2012 8:20 PM, Gavin Fung wrote:
Hi, All

I found that showing two formats(one is subfile) at the same time is not as
expect result. The case is the COLOR attribute not works on FIELD2 after
EXFMT CTL2 and page up/down will cause FIELD1 still in blue color but
FIELD2 back to its default color(like my front color is green then FIELD2
is green now). I'm considering combine the fields from FMT01 into CTL2 as
output usage to solve it, any suggestions? Thanks in advance.

1)display file codes:
A**------------------------------------------------------------------------
A*
A R FMT01 OVERLAY
A CF03
A CF12
A*
A 4 2' FIELD1 :'
A COLOR(BLU)
A D1TRCD 3A B +1TEXT(' FIELD1 ')
A 30 DSPATR(RI PC)
A 34 DSPATR(HI PR)
A*
A +1' FIELD2 :'
A COLOR(BLU)
A D1PORT 3A B +1TEXT(' FIELD2 ')
A 31 DSPATR(RI PC)
A 34 DSPATR(HI PR)
A*
A**------------------------------------------------------------------------
A*
A R SFL2 SFL
A S2OPTN 1A B 7 3
A 35 DSPATR(RI PC)
A S2RFLG 1A O 7 8DSPATR(HI)
A*
A**------------------------------------------------------------------------
A*
A R CTL2 OVERLAY
A CF03
A CF12
A SFLCTL(SFL2)
A SFLSIZ(9999)
A SFLPAG(15)
A 25 SFLCLR
A 26 SFLDSPCTL
A 27 SFLDSP
A 28 SFLEND
A D2RNBR 4S 0H SFLRCDNBR
A*
A 6 2'SEL'
A COLOR(BLU)
A DSPATR(UL)
A*
A 6 6' REVISED'
A COLOR(BLU)
A DSPATR(UL)

program codes:
C @DSP01 BEGSR
C*
C ......
C EXFMT FMT01
C ......
C @DSP01E ENDSR
C*
C @DSP02 BEGSR
C*
C ........
C WRITE FMT01
C EXFMT CTL2
C ..........
C @DSP02E ENDSR
C*

2)first display, they both in blue:
FIELD1 : ____ FIELD2 : ____

3)after input, write the subfile(records more then 15), they still in blue
if you don't page up/down,
FIELD1 : ____ FIELD2 : ____

SEL REVISE
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R
_ R +

4)page down, color changes, but press ENTER they both back to blue
color(because FMT01 has been written again).
FIELD1 (still in blue) : ____ FIELD2 (now is green, COLOR not works) : ____

SEL REVISE
_ R
_ R
_ R
_ R



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.