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



Have you tried writing a blank record to the subfile?

You can also write a "No Records Found" record format overtop the
subfile display area. Here's a broad example.

Display file record format NRCDFMT overlays the screen area where
subfile records would be displayed.

A R NRCDFMT
A OVERLAY
A 15 19'No Records Found'
A DSPATR(HI)

Code snippet...

// rrnInSfl is incremented each time a record is written to the subfile

D rrnInSFL S 4S 0 like(SFRRN)

/free
.
.
.
if (rrnInSFL <= 0); // No entires to display
write(E) NRCDFMT; // No entries found record
endif;

write(E) FUNCTNKEY; // Function keys record

write(E) ERRMSGSFLC; // Put messages to the screen

exfmt SUBFILECTL; // Subfile control record
.
.
.
/end-free

Writing the NRCDFMT assumes the SFLDSP keyword is not active.

Hope this helps

Gary Monnier

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Pete Helgren
Sent: Thursday, February 17, 2011 2:06 PM
To: RPG Midrange Discussion
Subject: Best practice for displaying an empty subfile

I have an program that displays records in a subfile and it works great,

until there are no records to display. In that case it crashes with a
predictable RNQ1255. I set off the subfile display indicator before I
EXFMT when I have no records to display so I am wondering if there is
other logic I need to add so I can at least display the empty subfile
screen.

Thanks


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.