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



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

On 22/08/2022 4:01 am, Gad Miron wrote:
Hello Frank

What I'm actually after is an easy & convenient way to dynamically set
attributes
of fields on the screen, like Color, PC, Protect, etc.
and without using indicators !

I would like to be able to code the following
Field1.color = 'RED'     -  set color to red
Field1.BL = 'Y'                - set blinking on
Field1.PC = 'Y                - position cursor in Field1

AND I would like all these attributes to be ready to use out-of-the-box
without having to prepare Program-to-Screen fields or code special
procedures
or DCM-like hoola hoops.

Hope this makes sense
Gad

P.S
It would also be nice to be able to set Record level attributes the
same way
like DSPSIZ = '*DS4'



date: Sun, 21 Aug 2022 15:14:05 +1000
from: Frank Kolmann <Frank.Kolmann@xxxxxxxxx>
subject: (RtnDspAtr-like) functionality,for EVERY input/output field

Hello Gad


I am not understanding why you need the Display Attribute of the I/O
fields.
I have no clue how you plan to use RtvDspAtr, or what use such a
function will serve.

It is quite possible to code your our procedure to get this information,
then you can use the procedure as you wish.

You could code a module to do this using a combination of
  ?DSM?? Read Screen (without waiting for an AID key).? QsnReadScr.
(fwiw
Its not a trivial Api but doable.)
This gives you the entire screen data including attributes, it has
Row/Col information.
and
Your program code needs to know what Screen Format you are using.
and
Then you could use the program DSPINFO, it gives you a Multi Occur DS
that is a list of all the fields with Format and Field Names and
locations from the file object.
  From this you can obtain a list of all I/O fields and the fields
screen
attributes for your selected Screen Format.

Frank


On 20/08/2022 5:31 pm, Gad Miron wrote:
Thanks to all responders.

I have learned a LOT
(including but not limited to a forgotten DSM)

However,
my OP consisted of asking IBM to add BUILT IN
(RtnDspAtr-like) functionality
for EVERY? input/output field in the display.
Thus freeing the programmers to do business related logic.

But, as the subject says, it is 20 years too late.

Gad





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.