Highlighted
Absent Member.
Absent Member.
1936 views

[archive] Ntf Changed

[Migrated content. Thread originally posted on 30 January 2004]

I have an entry-field with NOTIFY CHANGE set to true.
It's my intention to fill a grid with data, every time the user changes the entry-field.

This works just fine, fut some users are having slow processing over the network. So I want to change this procedure in this way that the grid is filled with data after the user pauzes for a couple of seconds.

You can compare it like the way the search-engine works in 'Help'. If I type 'acc' for instance, and I wayt, then I get a list of all 'acc-subjects' and the engine just changes 1 time.
My routine changes every time I enter a letter.

Any suggestions ?
0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

I assume you are using thin client, and that is where you are seeing the delay? It is exactly this network latency that causes us to suggest you not use things like NTF-CHANGE - a network message must go from the client to the server for every key press. After all, the COBOL program must be allowed to execute for every keypress (that is what the NTF-CHANGE does).

There is currently no way I know of to cause the thin client to only send messages back to the runtime if there is no activity for a short (definable) while. That is an interesting enhancement, and would allow things like NTF-CHANGE to be usable in a thin client environment. I suggest you contact tech support to make such an enhancement request.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Another options would be to use ACCEPT xxx BEFORE TIME yyy. If you keep yyy in a variable, you can use a value you find appropriate while waiting for some data, once you have gotten some and started the grid manipulation, you set the time out variable to 0, disabling it, and thus keeping the network interference to a minimum as well.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Gisle,

Hereby a small project.
Every time the entry-field is changed, the grid is filled with data.
As explained before, I just want to fill the grid when the user pauzes a while on the entry field.

Can you please complete this small exemple, because I don't get anywhere. I tried 'accept omitted before time xx' in the event 'fill-grid', but then the entry field gets selected every time again and this is not the intention.

Looking forward to your code... as others do
Txs alot
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Originally posted by Hans
Gisle,

Hereby a small project.
...
Looking forward to your code... as others do


Thank you for your confidence in me Hans, I am however afraid I have to dissapoint you. I have no such project "flying around", and I cannot take the time to do such a thing, except try to elaborate it further.

What I had in mind was just that you would extend your current ACCEPT statement with BEFORE TIME xxx, where xxx was the desired amount of time before taking action. When an ACCEPT terminates due to a timeout, it has a reserved exception you could trigger, thus knowing what the condition for the exception was.
This was a suggestion given in light of your original problem. If this causes unwanted highlightening, that would be another issue. Of which I have no instant answer. Why don't you create a small sample and post the code, perhaps I or others have some solution when we see the code.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Txs anyway Gisle ..

Here's a little sample of code...

For now, the grid is allways filled with data when my entry-field is changed. How can I, when the entry-field has the NTF-CHANGE property set to TRUE ... concidering that the user must be able to enter data in a continues way, and when he pauzes for a couple of seconds, fill the grid ?


*
NUMBER-EF-Ex-Ntf-Changed.
PERFORM FILL-GRID.
*

*
FILL-GRID.
PERFORM FILL00 THRU FILL99.
FILL00.
MOVE 1 TO LIJN.
MODIFY TABEL, RESET-GRID = 1.

PERFORM 10 TIMES
MOVE SPACES TO TABEL-RECORD
MOVE COUNTER TO TABEL-RECORD
MODIFY TABEL, Y = LIJN,
RECORD-DATA IS TABEL-RECORD
ADD 1 TO LIJN
END-PERFORM.
FILL99.
*
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Let me think about it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Davide,

Sorry for this late reply but thanks, your routine works.

I have changed it somehow to make it shorter, but now I'm not sure if this is a good approache concerning the threads.

Can you check it out and tell me if I'm doing the right thing here or not.

Thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Ntf Changed

Forgot to send the changed cbl

Regards
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.