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
 

 

EDIT END(SAVE) or CANCEL?

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

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sat Feb 06, 2016 7:11 pm    Post subject: EDIT END(SAVE) or CANCEL?
Reply with quote

I have been on this for a while, modelling in ISPF 7.6 and done *REXX section SAY diagnostics as well as the obligatory RTFMing so...

I am editing a dataset with a customized panel.
I find here that I cannot from here detect the actions between CANCEL, END and RETURN. All display .RESP as END.
I would have assumed that the command value would be available as ZCMD or ZVERB. Not so in my trials.
And... Both return RC=4.
C'mon guys, where you hidin' this secret? icon_wink.gif
Funny, I never had this problem using the standard ISREDDE2 panel.
/Steve
Back to top
View user's profile Send private message

Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Sat Feb 06, 2016 9:18 pm    Post subject:
Reply with quote

Steve,
you don't say what kind of change you made to the edit panel.
I am not surprised that END and RETURN gives the same result, they are basically the same with respect to how EDIT ends.
I did a small test with a modified ISREDDE panel:

modify data & END -> rc=0 zcmd= presp=END
no change & END -> rc=4 zcmd= presp=END
CANCEL-> rc=4 zcmd= presp=ENTER

Or in other words, if the file has changed then I get rc 0, otherwise rc 4.

Willy
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Feb 08, 2016 1:02 pm    Post subject:
Reply with quote

Thanks Willy.
The panel has two extra entry fields above ZDATA.
I test for various values in both a REXX section within the PROC section as well as the RC afterwards.
When I enter the word CANCEL in the command field I get...
&ZCMD =
&ZVERB =
.CSRPOS = 00000004
.CURSOR = ZCMD
.PFKEY =
.RESP = END
and after edit get +++ RC(4) +++
When I enter the word END in the command field I get...
&ZCMD =
&ZVERB =
.CSRPOS = 00000004
.CURSOR = ZCMD
.PFKEY =
.RESP = END
and after edit again get +++ RC(4) +++

I would have expected(/hoped) that either ZCMD or ZVERB would have the value either CANCEL or END.

/Steve
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Feb 08, 2016 6:07 pm    Post subject:
Reply with quote

I didn't try your exact scenario, but on a customized View panel I see ZVERB="CANCEL" in the SHARED pool. The value in the function (implicit) pool was blanks.
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Mon Feb 08, 2016 7:17 pm    Post subject:
Reply with quote

Interesting. I don't have REXX code in the panel, I just check the values after the display. I see the ZVERB variable in the shared pool set to END if I hit the END key, regardless of whether a change was made, but null if I cancel the edit.
I checked the manual (zOS 1.13) but it says nothing about ZVERB in the shared pool.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Feb 08, 2016 8:47 pm    Post subject:
Reply with quote

In the panel I do the following.

VGET (ZVERB) SHARED

&SMGCMDS = &ZVERB

VPUT (SMGCMDS) PROFILE

In the Rexx I do the following

"EDIT DATASET('"WRKFILE"') PANEL(ISPFEDIT) MIXED(YES)"

RTRNCODE = RC

IF RTRNCODE = 0 | RTRNCODE = 4
THEN DO
RTRNCODE = 0

"VGET (SMGCMDS)" PROFILE

IF SMGCMDS = 'CANCEL' | 'CAN'

you can check check for any type of response such as END, SUB, SUBMIT
or any other command
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Tue Feb 09, 2016 9:22 pm    Post subject:
Reply with quote

Thanks guys. Yes I have been looking at ZVERB but only in the FUNCTION pool but I will revisit this in the SHARED.
I wonder why it's only in SHARED? Probably a good reason.
Excellent,
Thanks /Steve icon_biggrin.gif
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Wed Feb 10, 2016 1:24 am    Post subject:
Reply with quote

just did a few more tests.
change + save + change + cancel still ends rc=0, which is good as it tells you that the member was modified.

No idea why ZVERB is set in the shared pool , makes no sense to me.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Wed Feb 10, 2016 11:50 am    Post subject:
Reply with quote

I do not see any value in ZVERB for a CANCEL command typed or by PFK.
Code:
zverb = ""
ADDRESS ISPEXEC "VPUT (ZVERB) SHARED "
ADDRESS ISPEXEC "EDIT DATASET("mem") PANEL(MEMO) MACRO(MEMOM) "
erc = RC
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  5 Line(s) not Displayed
ADDRESS ISPEXEC "VGET (ZVERB) SHARED "
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  2 Line(s) not Displayed
SELECT
WHEN( erc=0 & zverb="END" )THEN NOP
WHEN( erc=4 & (zverb=""!zverb="CANCEL") )THEN
   CALL ABEXIT "TERMINATED BY CANCEL",,
               "The CANCEL command (or key) terminates MEMO."
OTHERWISE
   CALL ABEXIT "TERMINATED BY UNKNOWN",,
               "The action was terminated by the '"zverb
             !!"' command with an RC="eRC"."
END/*SELECT*/
With the hidden debuggery (RESP is set from .RESP in EDIT panel)...
For an END/RETURN (PFK or typed) I get...
RC=0
RESP=END
ZVERB=END

For a CANCEL (PFK or typed) I get...
RC=4
RESP=END
ZVERB=

SO it's predictable although I'd prefer if ZVERB was CANCEL and left it the code ...just in case someone kind at RTP changes it anytime soon! icon_cool.gif
/Steve
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Aug 08, 2016 4:01 pm    Post subject: BROWSE/VIEW END/CANCEL?
Reply with quote

Continuing this saga.
I tried the same in BROWSE.
When issuing a CANCEL in BROWSE, ZVERB is not set in SHARED!
A bit inconsistent?
Or possibly the concept of CANCEL, when one cannot change the data in BROWSE, is a little weird.
I still wish that whatever command I entered was passed back in ZVERB.
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 save SAY var loop. italo_pm CLIST & REXX 3 Sun Sep 04, 2016 3:06 am
No new posts Use of Edit & FTOV migusd SYNCSORT 3 Wed Jun 08, 2016 1:49 am
No new posts How storage is calculated for AN-Edit... Raghu navaikulam COBOL Programming 2 Wed Mar 09, 2016 3:51 pm
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am
No new posts How to create/edit/update a new GDG V... karthikbalakumar8 JCL & VSAM 2 Fri Feb 05, 2016 6:35 pm


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