|
View previous topic :: View next topic
|
| Author |
Message |
PokerGuru
New User

Joined: 23 Jul 2010 Posts: 33 Location: Europe
|
|
|
|
eg. F3 key Zverb = 'EXIT'
Can anyone tell me where I can find the Zverb for the Enter key. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
| IIRC(*) the enter key IN SE does not appear as a ZVERB values because the enter key does not have any action associated to it. |
|
| Back to top |
|
 |
PokerGuru
New User

Joined: 23 Jul 2010 Posts: 33 Location: Europe
|
|
|
|
Ok thanks Enrico.
Can anyone help me with the following issue then please:
Basically I go from an ISPF Panel into Browsing a Dataset, I am checking zverb during the browse to see if the user wants to F3 or Cancel from the process. If they F3 or cancel then the Cancel works fine. However when I hit enter, I just want to continue processing. Now it just stays within browse waiting for a ZVERB. Anyone have a solution?
| Code: |
ADDRESS ISPEXEC
"CONTROL DISPLAY SAVE" /* Save the current display. */
IF RC ¬= 0 THEN
DO
error_text.0 = 2
error_text.1 = ,
'E0200 CONTROL DISPLAY SAVE for' || tempfile || 'failed.'
error_text.2 = ,
'E0200 PTFHOLD dataset. RC=' RC
SIGNAL Z9999_ERROR_PROC
END
"BROWSE DATASET("tempfile")" /* Go into BROWSE mode. */
IF RC < 0 | RC > 8 THEN
DO
error_text.0 = 1
error_text.1 = ,
'E0200 Bad BROWSE ' tempfile RC
SIGNAL Z9999_ERROR_PROC
END
ADDRESS ISPEXEC "VGET (zcmd zverb nextactn)"
ADDRESS ISPEXEC "VPUT (zcmd zverb nextactn) shared"
IF RC <> 0 THEN
DO
error_text.1="VPUT 3 failed"
error_text.0=1
SIGNAL Z9999_ERROR_PROC
END
SAY 'ZVERB = ' ZVERB
"CONTROL DISPLAY RESTORE" /* Restore display. */
IF RC ¬= 0 THEN
DO
error_text.0 = 2
error_text.1 = ,
'E0200 CONTROL DISPLAY RESTORE of' || tempfile || 'failed.'
error_text.2 = ,
'E0200 PTFHOLD dataset. RC=' RC
SIGNAL Z9999_ERROR_PROC
END
ADDRESS ISPEXEC "VGET (zcmd zverb nextactn) shared"
IF zverb = 'CANCEL' | zverb= 'CAN' | zverb= 'END' | zverb = 'EXIT' THEN
DO
nextactn = 'CANCEL'
END
ELSE
DO
nextactn = 'CONTINUE'
END
|
|
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| let ISPF do the work for you - it knows F3/CAN etc. Hitting enter causes a RC=0 so keep displaying while RC=0. IF RC=4 (or whatever) terminate browse and crry on with the next phase of the program. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
enter is not a navigation key !
in browse You can hit enter as many times as You want and You will not exit from browse! |
|
| Back to top |
|
 |
PokerGuru
New User

Joined: 23 Jul 2010 Posts: 33 Location: Europe
|
|
|
|
Enrico - That's weird, as before I added my code to process zverb to the old existing code, when I hit enter or any other key during browse, then the "CONTROL DISPLAY RESTORE" command took effect and processing continued.
Nic - ISPF didn't recognise 'F3' or 'CAN' etc automatically during Browse until I added the code to process zverb, so it wasn't exiting automatically.... |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
Your description and understanding of the events is just wrong...
while in browse/view/edit behavior, hitting enter will leave You inside browse/view/edit . that' s it!
processing zverb takes place outside browse/view/edit
and You can get out of browse/view/edit ONLY by END/EXIT/CANCEL/RETURN. AMEN
tested with
| Code: |
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /* */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005 Address ISPEXEC "CONTROL DISPLAY SAVE"
000006 Address ISPEXEC "BROWSE DATASET('ENRICO.TEST.PS') "
000007 say "*****" "out of BROWSE"
000008 say "rc " rc
000009 say "zcmd " zcmd
000010 say "zverb" zverb
000011 Address ISPEXEC "VGET (ZCMD ZVERB) "
000012 say "zcmd " zcmd
000013 say "zverb" zverb
000014 Address ISPEXEC "CONTROL DISPLAY RESTORE"
000015 Exit 0
****** **************************** Bottom of Data ****************************
|
and while in browse You can hit enter until Your fingers fall off,
but You will remain there and the rest of the REXX script will take control only after END/EXIT/CANCEL/RETURN have been typed/followed by ENTER or the relative pfkey has been hit
tested also with VIEW and EDIT |
|
| Back to top |
|
 |
|
|