× 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: overlay question
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Wed, 7 Oct 1998 14:27:13 -0400
  • Organization: commsoft

On Wednesday, October 07, 1998 1:42 PM, mohammad khan 
[SMTP:mohammadakhan@yahoo.com] wrote:
>
> i have a question about overlaying 3 records in a dspf.
>
> how do you specify which records ought to be overlaid. i mean, in an
> rpg pgm. (which i must write) how do you tell the pgm to overlay rec1
> w/rec2 at this point in the pgm and rec3 w/rec4 at another point, so
> on and so forth...?
>
> i mean, when you add the overlay kywd. to a rec. in a dspf. (that
> works w/other recs. in the same dspf) is it necessary to specify the
> overlay kywd. with the other recs. if you don't want them to be erased
> when they work with the other recs.?

Assume you have 4 formats:
RECA has headings/data on rows 1-5
RECB rows 6-10, OVERLAY
RECC rows 11-24, OVERLAY
RECD rows 10-11, OVERLAY

Notice that RECD has data that would overlap RECB and RECC

The normal action is that when you WRITE/EXFMT a record, it will ERASE all 
records currently on the display.  OVERLAY tells OS400 to ignore that 
action and not erase any records on the display unless they overlap the 
one being put out.  If your RPG program did:

WRITE RECA
WRITE RECB
WRITE RECC

what would happen is that RECA would go out and put information on rows 
1-5, then RECB would overlay RECA (because there's no overlap) and put 
information on rows 6-10, then RECC would overlay RECA and RECB (because 
there's no overlap) and put information on rows 11-24.  Altogether, you'd 
have 3 record formats with data on rows 1-24.

If you then did a WRITE RECD, the following would happen:
RECA would be left on the screen because there's no overlap between RECA 
and RECD;
RECB would be erased because there is overlap between RECB and RECD;
RECC would be erased because there's overlap between RECC and RECD;
RECD would put data on rows 10-11
Altogether, you'd have 2 record formats (A and D) with data on lines 1-6, 
10-11

Take a look at the DDS manual for specifics on every keyword in your 
display file.  All the AS/400 books are on the web at 
http://as400bks.rochester.ibm.com/ If you can, try to ask someone at your 
site for examples of working code to use as a basis for your 
application...

Buck Calabro
Commsoft, Albany, NY
mailto:mcalabro@commsoft.net

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.