Page 1 of 2

can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 7:19 am
by jack_test
I want to simulate the ENTER key in the panel without press any key and receive the data goto the next panel.
I try to use "CONTROL NONDISPL ENTER", but it dose not work.
can anyone hlpe

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 9:24 am
by dick scherrer
Hello and welcome to the forum,

If there is no interrupt causing key (i.e. Enter, PFn) pressed, there is no data available to process. . . .

Possibly i misunderstand.

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 9:30 am
by NicC
No - Rex cannot simulate the enter key because until your panel finishes ISPF is in control, not Rexx. I am not sure if what you want to do can be done without looking it up and I am even less sure if it is a data entry panel that you are displaying.

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 5:59 pm
by Stefan
It depends on what you mean by "receive the data".

You cannot receive data entered by a user without having the user press an interrupt key, i.e. ENTER, PF1 to PF24, or some strange attention keys. Only this kind of event leads to a transmission of the 3270 data stream to your terminal emulator.
But if you want to get the data defined by assignment statements in the INIT or PROC section of a panel, you have to use the "ISPEXEC CONTROL NONDISPL ENTER" functions right before your DISPLAY statement. This function suppresses the display of the next (and only this one) panel and simulates the ENTER key as the user response to the NONDISPL processing for the next panel.
You can find more details in the manuals.

If your code leads to errors, please trace your program and have a look especially at the return code of the ISPF service and the content of the special variables zerrsm and zerrlm right after the failing ISPF service.

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 6:45 pm
by Robert Sample
As Dick said, a fundamental principle of 3270 terminal software (based on the 3270 data streams which go back 40 years and more) is that a key (referred to as an attention key) must be pressed to send data from the terminal to the mainframe. The enter key, a PF (program function) key, a PA (program attention) key, or selected other keys (such as CLEAR) are attention keys. Unlike a PC or Unix machine which can examine every keystroke as it is made, a 3270 screen can have hundreds -- or even thousands -- of keys hit and nothing is transmitted to the mainframe until an attention key is hit.

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 7:31 pm
by Pedro
CONTROL NONDISPL ENTER should work. How are you displaying the panel? Is it the SELECT service or the DISPLAY service? If it is SELECT, the panel will remain in control until you make a selection, just as it would if you were to press Enter manually. Try setting ZCMD to your selection before the SELECT service.

Also, read about the .RESP = ENTER statement in your panel definiiton.

Re: can REXX simulate the ENTER key in panel

PostPosted: Mon Mar 04, 2013 7:51 pm
by enrico-sorichetti
I try to use "CONTROL NONDISPL ENTER", but it dose not work.
can anyone hlpe


just telling it does not work is just a waste of time for everybody...
there are situations where it is appropriate to <self> navigate thru panels

to make the most out of the replies You might get it would be wiser to describe the whole
requirement rather than ask about a lowly technicality

Re: can REXX simulate the ENTER key in panel

PostPosted: Tue Mar 05, 2013 10:02 pm
by Pedro
You cannot do this to skip the second panel:
CONTROL NONDISPL ENTER
DISPLAY PANEL(pan1)
DISPLAY PANEL(pan2)

The CONTROL ... ENTER is only good for one display.

You still have not explained if you use SELECT or DISPLAY to display the panel.

Re: can REXX simulate the ENTER key in panel

PostPosted: Wed Mar 06, 2013 11:30 am
by jack_test
i am sorry i didn't tell the demand clearly.
My question is that whether panel2 simulate the entry realistic.
For example,There are two panels named panel1 and panel2.When i put some data on panel1,and then press the entry,it can call panel2.The question is that the data that i put on the panel1 transfer to the variable defined on the panel2,and then simulate entry,Is that true?
please help to give some advice,thanks a lot.

Re: can REXX simulate the ENTER key in panel

PostPosted: Wed Mar 06, 2013 7:40 pm
by Pedro
Yes, the variable in panel1 should carry over to panel2. What happened when you tried it?

Repeating:
Also, read about the .RESP = ENTER statement in your panel definition.

Repeating:
You still have not explained if you use SELECT or DISPLAY to display the panel.