Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Return control to program on using TAB or arrow keys from display.

363 views
Skip to first unread message

jeevan....@gmail.com

unread,
Jan 11, 2008, 3:11:16 AM1/11/08
to
Hello,

I have come across a requirement, where I have to return the control
to RPG program from a display file, upon exsiting from a I/O capable
field either by TAB key or by arrow keys. So the data can be processed
in the RPG program.

Thank you.
Regards,
Jeevan

Dr.UgoGagliardelli

unread,
Jan 11, 2008, 9:07:06 AM1/11/08
to
il 11/01/2008 9.11, Scrive jeevan....@gmail.com 40467008:

> Hello,
>
> I have come across a requirement, where I have to return the control
> to RPG program from a display file, upon exsiting from a I/O capable
> field either by TAB key or by arrow keys. So the data can be processed
> in the RPG program.
None, the keybord is controlled by emulator or terminal, only function
keys give control to the program.
--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'

nsm

unread,
Jan 12, 2008, 8:49:28 AM1/12/08
to

The nearest thing i know is that you can define a display attribute to
a field (can't remeber the exact one, look it up), which will result
in control returned when field exit is pressed or the cursor is at the
end of the field when typing.

There are no method however to control leaving the field by arrow keys
or tab.

Regards
Niels

Emile

unread,
Jan 13, 2008, 6:25:44 AM1/13/08
to
Take a look at the CHECK keyword and specific the CHECK(ER) keyword.

ER
End of record; equivalent to AUTO(RA)
Use this code so that the workstation user does not need to press the Enter
key. Whenever the workstation user keys a character (including a blank) into
the last position of the field, the record is sent from the device just the
same as if the Enter key had been pressed. If you also specify DSPATR(SP)
for the field, the record is sent from the device as soon as the workstation
user selects the field. If you use this function, it should be on the last
field typed in by the user for this record.

Option indicators are valid for this keyword.

http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.langref2.doc/rzakcmstdfcheck.htm


jeevan....@gmail.com

unread,
Jan 15, 2008, 11:58:38 PM1/15/08
to
> http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topi...


Thank you for the response. I have checked with the CHECK(ER) keyword.
This keyword works with 'field exit' key, and simulates the 'ENTER'
key. But I have to pass the control to the program once the user
leaves a field, either by TAB or by the arrow key. So I have no idea
how to pass the control back to RPG, when the user leaves a field by
these two keys. I guess the DSPATR(SP) is to work with the field
selection by light pen, and that too upon selection of a field. It
seems quite different from my requirement.

Any suggestion most welcome.

Thank you.
Regards,
Jeevan

Jonathan Bailey

unread,
Jan 21, 2008, 6:14:06 AM1/21/08
to

I have 2 suggestions for you which are most likely not what you want:
1) Use the waitrcd(X) keyword when generating the dspf. Then write the
record & read the file. This will return control to the program &
seton the %error flag when X seconds have passed if the user hasnt
pressed a function key or enter etc. Then you can check the cursor
position. This results in a lumpy response to the users.
2) Have the field they want to change 'pop up' in a window. The user
can only chnage the 1 field then you can validate it when they press
enter & move onto the next. You can move a single window reound the
screen if you need to do this on a few fields & want to make it look
like the field is 'highlighted'

HTH
Jonathan.

0 new messages