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


  • Subject: RE: RPG Indicators
  • From: SHISHIRKSINGH <SHISHIRKSINGH@xxxxxxx>
  • Date: Sun, 9 Apr 2000 10:18:02 +0530
  • Importance: high

Is it possible to control the affect of DSPATR through the program rather
than using indicators on the DSPATR key word?  

A               FIELDX  10A             
        88                              DSPATR(ND)
        89                              DSPATR(PC)     

E.g. - Here DSPATR(ND) and DSPATR(PC) will be affected only when 88 and 89
is on. Can this be simulated by using Program to System variable on DSPATR
as described below. I have never used this method in coding. Seems to be a
good approach, providing it gives me the flexibility to manipulate different
attributes simultaneously.

Also, what are the Hex values for position cursor, no display etc. .. etc..
(barring the color codes)   


Shishir
-----Original Message-----
From: István Rudas [mailto:Istvan@Rudas.net]
Sent: Saturday, April 08, 2000 9:15 PM
To: RPG400-L@midrange.com
Subject: Re: RPG Indicators


At 08:13 08.4.2000 +0800, NGUI FONG LON wrote:
>I need advice in RPG/400 here urgently. I need to use an indicator to
>control the DSPATR keyword in a RPG program. However, in this particular
>program, all the indicators (from 1 to 99) have been used up. What can I do
>about this?

Hi Fong Lon,

the use of 99 indicators is not modern, we should avoid indicators at all,
but this would not help you quick, even it is true (=for the next time).

Instead of an indicator you could also do:

pass your attribute to the DSPF as variable: 
*note: extracted from an article by Christian Rehn, www.common.at/info.html

DDS:
A               FIELDX  10A             DSPATR(&ATTR)
A               ATTR            1A      P       


CLP:
        CHGVAR   &ATTR   X'21' 
        SNDRCVF

other Programming language: 
C       MOVE  X'21'     ATTR     1      (alpha) 
C       EXFMT dsprecordformatname

(the hex attributes you need for DSPATR should be in your DDS manual)

I add to Christians sample: don't forget that in this case you/your program
is responsible for ATTR (=you have to fill it always with a valid hex value
or you recieve a hard I/O-Error).

The answer of Jon Erickson, that someone uses a 99-element array (by MOVEA
*IN) is also in my opinion a hazard to be managed and maintained. It also
doubles the problem, that "N47" or "78" does not mean anything to the next
programmer.
:-(   or ask Toronto for coloured indicator arrays....  


Hope it helps   
István 
(Anton, isn't this a 0,02 EURO?)      =:-)!

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.