Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ZVERB for Enter/Return key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ZVERB for Enter/Return key
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu Jun 16, 2011 9:29 pm    Post subject: Reply to: ZVERB for Enter/Return key
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    Post subject: Reply to: ZVERB for Enter/Return key
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: 1722
Location: UK

PostPosted: Thu Jun 16, 2011 10:19 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu Jun 16, 2011 10:32 pm    Post subject: Reply to: ZVERB for Enter/Return key
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu Jun 16, 2011 11:16 pm    Post subject: Reply to: ZVERB for Enter/Return key
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts DFHWS2LS return value divated CICS 4 Mon Nov 07, 2016 5:44 pm
No new posts Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts EZASOCKET Return code 32509 amitc23 All Other Mainframe Topics 4 Mon May 23, 2016 4:13 pm
No new posts why i need hit enter after EXECIO * D... jackzhang75 CLIST & REXX 10 Fri May 20, 2016 9:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us