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



Hi Jason

Reviewing at your code there are a couple of things to look at:

1. In your code, you are checking for a function key being pressed and then
turning it off straight away. You don't need to do that. When the subfile
control is displayed with the EXFMT all function key indicators are reset
automatically.

2. In your @GETORD subroutine you check for F6 (*INKF) being pressed and
call subroutine @CHKCHG. In subroutine @CHKCHG you then test for F12
(*INKL) being pressed and call subroutine @GETORD. Unless there's an EXFMT
in subroutine @CHKCHG which hasn't been shown in the code snippet then F12
can't have been pressed - you can only press one F-key at a time.

3. My personal preference would be to code the DOW as a DOU purely because
it removes the need to ensure that the criteria is met first time in because
you always want to display the screen at least once:

DOU *INKF = *ON or *INKC = *ON or *INKL = *ON

4. Another personal preference is to not use the *INKx indicators for the
function keys, but to use named indicators such as Cmd_F3, Cmd_F7, F3_Exit,
etc because it makes the program easier to read. I've notes on how to do
this at http://www.astradyne-uk.com/docs/07-02003.pdf

Hope it helps

Jonathan
www.astradyne-uk.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jason Cawood
Sent: 02 October 2007 05:32
To: rpg400-l@xxxxxxxxxxxx
Subject: Help with Function Keys in a subfile

I'm working on my first subfile program and I'm having trouble with
the *inkl indicator not setting it to *off.

I've only been working with RPGIV for a little over a year now and
have learned a lot from the posts all of you have left.

Here is the section I'm having trouble with.

C @getord begsr
...
C DoW *inkf = *off
C and *inkc = *off
C and *inkl = *off

C Write Footer
C ExFmt SUBCTL

C EndDo

C If *inkf = *on
C Eval *inkf = *off
C EXSR @ChkChg
C EndIf

C ENDsr
*--------------------------------------------*
C @ChkChg BegSR
...
C If *inkl = *on
C Eval *inkl = *off
C Exsr @getord
C EndIf
...
C ENDsr






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.