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



What I want to be able to do is create a "common" display file that has, for instance, the company name and the date,

I would suggest you may define the top line or two of the screen as one text field. Retrieve the company name from a file (over the years they do change and someone down the road will be grateful). Then retrieve the date, program-name, other stuff of interest and build the top line in a called RPG pgm. Bring it back into your display program and load the top line or two without the display pgm knowing what is in the string.

Define the top line(s) as variable length and center everything in the called pgm so you can support 80 col or 132 col or whatever screen size.

Maybe you can do the same for the function key line at the bottom. Then in the RPG pgm only respond to keys that were defined - maybe define them in a file by program name.

This should work well for output-only data such as company name, function keys, etc. Not so well for input fields.


Going a route like UIM may be technically superior to DDS, but it is unknown to most developers and therefore may be more challenging for a shop to support over time.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Sarah Kemp
Sent: Tuesday, January 28, 2014 4:38 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Common Display File (Header + File-level Keywords)

I learning about RPG and DDS for screens and I am trying to determine if there is some method of including or referencing one DDS screen inside of another. What I want to be able to do is create a "common" display file that has, for instance, the company name and the date, and includes some file-level keywords and allowed function keys (INDARA, CA03, etc.). Then, ideally, I would be able to create program-specific screen content in a separate file without having to redefine the common function keys, header information, and file-level keywords.

Is there a method of including DDS source with something like a /copy? Or can I use two display files in one RPG program and have their allowed keys and keywords both active at the same time? I have tried using two in one program, but I can only get them both to display by using EXFMT rather than WRITE for the header file, which means control needs to be returned before the main screen is written. If I use a WRITE header followed by an EXFMT main screen, only the main screen is displayed and none of the file-level keywords from the header are active.

I have also seen advice to designate a header field in your display file and customize it in your program in order to allow a more standardized header, but I don't know how (or if) it can be used with file-level keywords and allowed function keys?

If this is not possible, how is screen standardization usually handled?

Thank you,
Sarah

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.