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



Scott,

You could use CSRLOC to set the cursor position rather than DSPATR(PC).
> That'd eliminate the need for an indicator.


I fully agree.  I tend to avoid indicators whenever possible, though they
are still needed for some things like controlling subfile operations.  But
even then you can rename/map them to meaningful names so the RPG code is at
least fairly readable.  I use DSPATR(&var) for setting attributes, and
CSRLOC() for positioning the cursor.  To avoid hassles with getting the
row/col correct for CSRLOC, I abstract that out to a subprocedure which uses
QDFRTVFD to obtain the position when passed a dspf, record format, and field
name.

This whole DSPATR(&VAR) thing was very poorly done, IMHO. People coding
> DDS want a level of abstraction between their code and the 5250 data
> stream.  They don't want to code raw 5250 codes. IBM could've easily
> written it so that you set  var = 'HI BL', and had it be high intensity
> and blinking.. they didn't need you to pass the raw attribute code.


Using /Copy and meaningful constant names go a long way here.  My bigger
gripe is the lack of being able to specify a field name inside a variable
for CSRLOC(), similar to how RTNCSRLOC() can perform the opposite and return
the actual field name (if any) where the cursor was located when an AID byte
was pressed.  I work around that using my own subprocedure, but it always
struck me as odd they added support for returning the cursor location by
field name but not setting it!

Doug

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.