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
 

 

Capture user entered command after ISPEXEC EDIT dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
cheryala

New User


Joined: 20 Mar 2006
Posts: 46

PostPosted: Fri Jul 27, 2007 3:05 pm    Post subject: Capture user entered command after ISPEXEC EDIT dataset
Reply with quote

Dear all,
I am giving control to user to edit a dataset using

ADDRESS ISPEXEC "EDIT DATASET('datasetname')"

My requirement is to capture user entered command at the command prompt. If he enters PF03 , then dataset has to be saved and proceed with the normal processing and if he enters CANCEL i have to go back to the start of the program.

I know that after executing the above statement if RC = 0 then user has entered PF03 and RC = 4 if user uses CANCEL command..But here if user does't modify any data then also the RC is assigned to 4. My requirement needs even if user doesn't edit dataset but presses PF03 i have to start executing next statements. So I would like to know how to find whether user has entered CANCEL or not ?

Thanks in Advance.
Cheryala
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 27, 2007 7:23 pm    Post subject: Re: Capture user entered command after ISPEXEC EDIT dataset
Reply with quote

I took a copy of the IBM supplied panel ISREFR01 into my own ISPPLIB concatenation, and in the PROC area changed the VPUT line to include the ZCMD after ZSCED.
Code:

)PROC                             
  &ZCURSOR = .CURSOR             
  &ZCSROFF = .CSRPOS             
  &ZLVLINE = LVLINE(ZDATA)       
  VPUT (ZSCED ZCMD) PROFILE       
                                 
)END                             


And in the REXX we have ........
Code:

 /* REXX */                                                         
 SYSEXEC = "xxxxxxx.REXX" 
ISPPLIB = "xxxxxxx.ISPPLIB"           
 ISPSLIB = "xxxxxxx.ISPSLIB"               
                                                                     
 "ALTLIB ACTIVATE APPL(EXEC) DA('"SYSEXEC"')"     
 ADDRESS ISPEXEC "LIBDEF ISPPLIB DATASET ID('"ISPPLIB"')" STACK     
 ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('"ISPSLIB"')" STACK     
 "ISPEXEC EDIT DATASET('xxxxx.xxxxx.xxxxx') PANEL(ISREFR01)" 
 RCX = RC
 "ISPEXEC VGET (ZCMD) PROFILE"
 SAY RCX ZCMD
 "ALTLIB DEACTIVATE APPL(EXEC)"


If I use CAN to CANCEL out of the edit session the display is
4 can

If I use PF3 without any data edit the display is
4

If I use PF3 with data edit the display is
0
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Jul 29, 2007 10:00 am    Post subject:
Reply with quote

You can use the DATA_CHANGED command.

O.
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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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