Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indicator Keywords

Status
Not open for further replies.

USADarts

Programmer
Dec 20, 2004
21
0
0
US
If I setup an indicator keyword in the File-Level on a DDS, it does not work with the RPGLE program. However, when I set it up within the record level, it works fine. Why is this?
 
Are you refeering to CFxx/CAxx function key keywords?

It's always worked for me. What I do is define the keys that are universal to every screen at the file level, and the others are defined on the record format level, whether they are used or not. Unused keys get a response indicator so that I can send an error message when they are pressed (this way, the user does not have to press Reset).

If pressing an F-key is supposed to return data, you have to code it as CFxx. CAxx does not return data to the program.

Da mihi sis crustum Etruscum cum omnibus in eo.

 
Exactly what I do.

A DSPSIZ(24 80 *DS3)
A CF03(03 'Exit')
A CF12(12 'Cancel')

Weird.....the RPG program is NOT accepting the F3. Cannot understand why.

When I move the CF03 to the record level, it works fine.

hmmmm.....I will keep digging.

David
 
How are you processing F3 in your RPG program?

Da mihi sis crustum Etruscum cum omnibus in eo.

 
C If *in03 = *on
C eval *inlr = *on
C Endif

During debugging, the *in03 does NOT turn on. I did go baclk to "Old School" and put *inKC, which did turn on.

David
 
Yeah, we use *INKx ourselves. Some may not agree, but I happen to think it's more intuitive. I just keep a chart of what key maps to what indicator.

*INKA=F1, and so forth, through *INKY (but *INKO is not used).

Da mihi sis crustum Etruscum cum omnibus in eo.

 
I did something else.....I set in03 to *on at the beginning of the rpgle program. I did a step by step debug. One of the steps is chaining back to the subfile. This step changes all indicators back to *off.

Not sure why.

 
Just a little sidenoye. The words exit and cancel tells me you want to leave the program with the press of F3 or F12. If that is the case CAxx is the right keyword to use.

Furthermore... without knowing exactly what Im talking about. When placing CAxx/CFxx in records you, if I remember correctly have to read that record for beeing able to get that indicator response. As your trying... one would assume that keeping them on file level would apply to all records read? but perhaps not? :) Cant help you there really.

Also a little tip. Usage of the INDARA keyword in the DSPF gives you the ability to define your own indicatornames in the RPGLE. The code gains a lot of readability with indicatornames such as F3, F12, clrSfl and so on.

- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and I really like that cold beer that should be every mans right after a hard days work!
 
USADarts said:
I did a step by step debug. One of the steps is chaining back to the subfile. This step changes all indicators back to *off.
Yep, that's normal behavior. You have to check the F-keys after the EXFMT and before you do any other processing. I usually use a SELECT group and process all of the F-keys that are active for that record format (or are global). The OTHER clause is what happens when the user presses Enter (that is, if he doesn't press any F-keys).

Your F-keys should be processed immediately after you do an EXFMT to the subfile control record (not the subfile data record).


Da mihi sis crustum Etruscum cum omnibus in eo.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top