|
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
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.