View previous topic :: View next topic
|
Author |
Message |
cheryala
New User
Joined: 20 Mar 2006 Posts: 46
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
|