Hi, everyone. I'm using SFLINZ to initialize my (data entry) subfile, which contains P-fields used to set display attributes [e.g. DSPATR(&FLD01P)]. Since P-fields are character fields (1A P), and SFLINZ documentation says that character fields are initialized to blanks, the initial attribute byte value is blank (X'40') ... which I find rather rude of IBM to do to DSPATR P-fields considering that normal text has an attribute byte value of X'20'. ;-)
The fields with these attribute byte values seem to be correctly displayed initially; the fields on the empty lines appear in normal text, unprotected, and underlined -- as if each attribute byte was X'24'. Yet in Debug it appears that the P-fields are still X'40'. (So where do the actual display attributes come from?!) When I try to highlight a field by turning on the reverse-image bit (X'01') with %BITOR, the new P-field value is X'41' (not a legal DSPATR P-field value like X'25') and the field is not displayed in reverse image.
Since different fields could have various combinations of other attributes set (protection, column-separators, red, high-intensity), I just want to set the reverse-image bit on rather than clobber the attribute byte with X'25'.
I could test for a bit configuration like '-1------' and convert it to '-01-----' to make sure my attribute byte contains a legal P-field value (X'2n', X'3n', X'An", or X'Bn', n=0-F). But that's not very pretty! Has anyone dealt with such a situation before, and found a cool way to deal with it?
TIA,
Jerry
The fields with these attribute byte values seem to be correctly displayed initially; the fields on the empty lines appear in normal text, unprotected, and underlined -- as if each attribute byte was X'24'. Yet in Debug it appears that the P-fields are still X'40'. (So where do the actual display attributes come from?!) When I try to highlight a field by turning on the reverse-image bit (X'01') with %BITOR, the new P-field value is X'41' (not a legal DSPATR P-field value like X'25') and the field is not displayed in reverse image.
Since different fields could have various combinations of other attributes set (protection, column-separators, red, high-intensity), I just want to set the reverse-image bit on rather than clobber the attribute byte with X'25'.
I could test for a bit configuration like '-1------' and convert it to '-01-----' to make sure my attribute byte contains a legal P-field value (X'2n', X'3n', X'An", or X'Bn', n=0-F). But that's not very pretty! Has anyone dealt with such a situation before, and found a cool way to deal with it?
TIA,
Jerry
Comment