|
It's been years since I've written a subfile program, but I have a
question.
The program has a subfile (SFL01, CTL01, OVR01) as well as another screen
(SCR01).
The F3 key is defined on the subfile as well as the screen.
SCR01 is displayed when they take an option on a subfile record. The
screen is displayed and if they hit F3 we come back to the loop displaying
the subfile. F5 (refresh) is forced into the function key so the subfile
is refresh, but for some reason when we are initializing the subfile
(writing the CTL01 record) it's getting set back to F3, so then it exits
the program all together.
FGGFAS1D CF E WORKSTN
F SFILE(SFL01:RRN)
F INFDS(WDSUBF)
D WDSUBF DS
D W$KEY 369 369
D SFLPG# 378 379B 0
So, the W$KEY is what we check to see what function key they pressed. It's
x'40' on startup.
They go into the SCR01 and press F3 and it's x'33'. The value x'35' (F5)
is being forced into it so the subfile is refreshed... but during this
code, it's set back to x'33'.
C eval RRN = 0
C MOVEA '0010' *IN(31)
C WRITE CTL01
C MOVEA '0100' *IN(31)
The WRITE operation is where it gets set back. And of course that causes
it to exit out all together (which we don't want to happen).
I don't recall this happening before.. then again, it's been years since
I've done a subfile. :)
Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud
Provider!
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.