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



I use the ASSUME keyword. (Without OVERLAY - I have no idea if that is important to the issue.) The format does not need to be referenced, but it does have to be there during compile.

I have included a link to a pop up calendar program that I call from several different places.

It has the line: DSPSIZ(*DS3 *DS4) and works on both screen sizes. By using WINDOW(*DFT 9 21 *NOMSGLIN) the window appears in *DFT relation to the location of the cursor, so placement is not a problem.

http://martinvt.com/Code_Samples/Pop-up_Calendar/pop-up_calendar.html

Before you are done you may also want to read up on the compile option RSTDSP(*YES) for display files.


On 3/6/2015 12:35 PM, Mark Murphy/STAR BASE Consulting Inc. wrote:
I have never used ASSUME or KEEP before, or not that I can recall. So I am having some difficulties.

I have a display file that contains a window format that I want to use as a common dialog. I want to be able to call the program from other display programs, and have the common dialog display on top of the current screen without the display being blanked first. It seems to me that ASSUME would fit the bill. The documentation says:

Specify the ASSUME keyword for at least one record format within the display file so that the IBM i
operating system does not erase the display when the file is opened. In addition, specify the OVERLAY
keyword with the ASSUME keyword to prevent the IBM i operating system from deleting the display when
your program sends the first output operation after opening the file.

and

For the IBM i operating system to process the data correctly, your program must specify the record
format name containing this keyword.

Here is my assume record format.

A R ASSUME
A ASSUME
A OVERLAY
A 1 3' '

I am including it in the program, but I do not actually perform any I/O operations to it. The terminology of that second quote is a bit ambiguous as I am specifying it in the program on the INCLUDE keyword, but not in an I/O operation. Do I need to do an input or output to that record?

Another thing that would be throwing a wrench in the works is the DSPSIZ keyword since this common dialog should work with both *DS3 and *DS4 displays. I know that the screen is cleared when the display mode changes, but the ASSUME keyword should prevent that because:

A file with the ASSUME keyword will be opened to the display size of the file with the KEEP keyword.

Coincidently, the file currently on the screen displays only in *DS4 mode, and that file (different from the one contain the common dialog) has a record with the KEEP keyword on it, though once again I am not outputting the KEPFM record. Do I need to?

A R KEPFM
A KEEP
A OVERLAY
A ERASE(HDRCTL1 -
A )

So displayfile A (has KEEP record in it) is on the screen, I want to display a window from display file B (has ASSUME record in it). Display file A has DSPSIZ(*DS4), display file B has DSPSIZ(*DS3 *DS4). I am hoping for the window in display file B to overlay the screen from display file A in *DS4 mode, but instead when I display the window, the screen is cleared, and the window displays in *DS3 mode. Obviously I am missing something. Any ideas what that might be?

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx



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.