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



Hello Don,

You wrote:
>Not a problem as the second format begins on line 11 and the first format
>occupies all lines.  Would it be a problem if the attribute byte on any
>field in the first panel overlaid the first position of the next panel?

And there's the problem!  You said "the first format occupies all lines".
OVERLAY cannot be used on its own to put one record format over another if
they share lines on the display.  You must either use CLRL or separate the
formats.

OVERLAY allows non-OVERLAPPING formats to share the screen.  If the formats
occupy the same lines (including a single attribute byte) then the
underlying format will be erased.  Here are the rules:

1. Whenever a format is written to the screen, the screen will be cleared,
unless OVERLAY is also specfied on the second and subsequent formats.

2. Even if OVERLAY is specified, the underlying format will be erased if
the new format occupies any part of the lines used by the underlying
format.

3. If formats share lines then CLRL must be specified with OVERLAY to stop
the underlying format from being erased.  The programmer is responsible for
setting the number of lines to clear correctly.

This situation commonly arises when using subfiles where the screen title
and screen function keys are on one record format.  If the title is on line
1 and the function key list is on line 23 then that format occupies the
ENTIRE screen (except line 24 but since that's the message line it doen't
really count).  The entire screen is used by that format EVEN if the lines
from 2 to 22 have nothing to display!

Even if you specify OVERLAY on the SFLCTL record the system will erase the
display because the subfile records occupy lines 'used' by the first
format.

You must split the first format into a header and footer section.  One of
them must have OVERLAY.  The subfile control record must have OVERLAY.
Make sure that none of the record formats share lines (even a beginning or
ending attribute on the wrong line is sufficent to cause the system to
erase the format).  Write the non-OVERLAY record first.  Write the first
OVERLAY record. Write or EXFMT the subfile control record.

If you actually want the second format to appear 'over' the first format
even though they share lines then either put it in a WINDOW or use
CLRL(*NO).

None of this is rocket science.  It is simply formulaic.  Like a recipe, it
is helpful if you understand what is happening but just by following the
instructions you can make a cake.

Regards,
Simon Coulter.

--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.