IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ZVERB for Enter/Return key


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Thu Jun 16, 2011 9:19 pm
Reply with quote

eg. F3 key Zverb = 'EXIT'

Can anyone tell me where I can find the Zverb for the Enter key.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 16, 2011 9:29 pm
Reply with quote

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
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Thu Jun 16, 2011 9:58 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jun 16, 2011 10:19 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 16, 2011 10:32 pm
Reply with quote

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
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Thu Jun 16, 2011 10:44 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 16, 2011 11:16 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts REXX GETMSG does not return £HASP880... CLIST & REXX 2
No new posts RXSUBCOM Return Codes / Documentation CLIST & REXX 6
No new posts REXX table content on panel will be r... CLIST & REXX 6
Search our Forums:

Back to Top