× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ok Roger,here goes.  I could be wrong and an happy to be corrected.

Originally IBM had model 5291 monochrome terminals and 5292 colour terminals.
The 5292 terminals were very very expensive and hardly no one purchased.
However the SAME 5250 data stream worked on both devices.
It was up to the device as to how the Fields attribute byte was interpreted.

When the IBM PC arrived it had by default a colour display.
Suddenly by inserting a 5250 emulator card into a PC everyone had a colour terminal but the screens all looked like GREEN screens.
One could change how the emulator hardware interpreted the 'attribute byte' , so the PC screens had colours even though the
5250 data stream was written for 5291 monochrome terminal.

There are at most 14 colours available even on 5292 colour terminals but ALL these colours are controlled by the SAME  Field Attribute byte.
I guess IBM did this so that the SAME code could run no matter what terminal type was used.
There is nothing like the 256 colours available in xterm.

Whenever I coded UDDS or DSM I never bothered with checking if the device supported colour or not.
DSM does have a command  “Query Color Support (QsnQryColorSup) API”
(QsnQryColorSup) determines if the display device supports color, but I never used this API.

In that sense the 5250 data stream simply has a Field Attribute Byte,  It does not have a Field Colour Byte.
It does have FCW  Field control Word, but I hardly used that as mostly, I think, it had to do with selector pens, that I never used.

fwiw
Frank




On 23/08/2022 2:50 pm, Roger Harman wrote:
I'm confused about your statement re: "...it still has no colour commands" since you reference the "red" attribute byte (x'28').

All the attribute bytes,*including color*, should be listed here.
https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/dsm1f.htm


Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power



-----Original Message-----
From: RPG400-L<rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Frank Kolmann
Sent: Monday, August 22, 2022 9:08 PM
To:rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: (RtnDspAtr-like) functionality,for EVERY input/output field

Hi Gad

The short answer is No.


The long answer, and I stand to be corrected is:-   (been a while)

The best you are going to get is Program-to-screen fields

FIELD1_ATR = x'28' ;  // Set colour to red


     A            FIELD1           10A  B  4 10DSPATR(&FIELD1_ATR)
     A            FIELD1_ATR     1A  P


I never noticed lower case field names are not allowed, how archaic is
that eh?

Your qualified field names ie Field1.color , introduce new RPG reserved
words,  ie .color  .BL  .PC  that wont happen IMO.
(5250 data streams are all pre OOP)

The 5250 data stream was designed for monochrome displays, it still has
no Colour commands. afaik
Colours are the result of how colour hardware interprets the monochrome
controls, IMO this wont change.

5250 Cursor control is not part of the attribute character, It is
contained in the FFW Field Format word, FFW is not directly controllable
from DDS.


Frank


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