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



Would it be different if you used CF09 (to return data to the program)
rather than CA09?

On 8/10/07, Jerry Adams <jerry@xxxxxxxxxxxxxxx> wrote:
The subfile control contains fields defined as both input and output.
The subfile itself is a list of all previously entered transactions
(with a select field that can be used to select the transaction for
update or deletion). Two of the subfile control fields are promptable;
if the client presses F9 while positioned on the field, an appropriate
inquiry program is called from which the client may select the value to
use for the field.


The problem that I am having is that, after the F9 key is pressed and
the primary program's subfile is re-displayed, any previously entered
fields are cleared (blank or zero). The control logic is:


DOW FKey <> F3;

WRITE MCU004AFK; // Function keys
WRITE MSGSFLB; // Message subfile
EXFMT MCU004ACTL; // Subfile control
EXSR $CMsg; // Clear message subfile

IF FKey = F3;
LEAVE;
ENDIF;


IF FKey = F9 // Prompt function
AND zzfld = 'UMA';
s#um = '***';
arq018(s#um:term);
IF s#um <> *Blanks;
uma = s#um;
ENDIF;
ITER;
ENDIF;


I have done this several times before with success; i.e., previously
entered fields are re-displayed with the values entered before the
prompt fills in data. The difference is that, in those cases, these
have been simple record panels, not subfile controls.


The subfile control record has:

R MCU004ACTL SFLCTL(MCU004A)
OVERLAY
SFLSIZ(9999)
SFLPAG(0014)
33 SFLDSP
N31 SFLDSPCTL
31 SFLCLR
90 SFLEND(*MORE)
CA09
RTNCSRLOC(&ZZRCD &ZZFLD &ZZPOS)
ZZRCD 10A H
ZZPOS 4S 0H
ZZFLD 10A H
RRN 4S 0H SFLRCDNBR


Am I missing a SFLxxx keyword, or is it not possible to do what I want
with a subfile control?

Thanks.
--
* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.