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

how to get previous Key value in REXX


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

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 27, 2010 4:33 pm
Reply with quote

My requirement is like this:

In REXX program,it will invoke ISPF service Edit to Edit a JCL dataset like:
Code:
"ISPEXEC EDIT DATASET('"TEMP_DS"')"

so then the dataset will be opened for edit,if I press F3,the job should be submitted and if I press F12 the job should be cancelled without being submitted.

how to get what key I press in the edit panel and then the key value can be used in REXX for the submit and non-submit action...

Please give me a guide.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu May 27, 2010 4:37 pm
Reply with quote

Is there a difference shown for the return-code from the EDIT Service when the END command is issued as opposed to the CANCEL command?

z/OS V1R9.0 ISPF Services Guide 2.9 EDIT--edit a data set - 2.9.4 Return codes
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 27, 2010 4:48 pm
Reply with quote

here is just a little comment from reference:
ISPEXEC EDIT:
RC = 0 Normal completion; data was saved.
RC = 4 Normal completion; data was not saved for one of these reasons.
No data changes were made during the EDIT session. The CANCEL
command was used to exit EDIT. Browse was substituted for EDIT
because insufficient storage was available to read in the requested data.

And if edit dataset and issue SAVE command then press F3 or F12,the situation will be complicated,so when press F3 or F12 in edit panel,I hope to get the key I press in rexx code and then in rexx I can do:
if keyvalue = F3 then submit job
if keyvalue = F12 then cancel job

please guide...
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu May 27, 2010 7:19 pm
Reply with quote

My suggestion is to capture the END at the time it is issued. Setup is with an initial macro.
Code:
"ISPEXEC EDIT DATASET('"TEMP_DS"') MACRO(mymac)"

With your initial macro using DEFINE macro instruction to define an alias of END.
Code:
/*rexx*/Address ISREDIT                     
"MACRO "
"BUILTIN RESET"                     
"define END         alias submitit"
"define RETURN   alias submitit"
"define EXIT        alias submitit"

When the user presses PF3 or if they even type END and press Enter, the SUBMITIT macro will get invoked. The SUBMITIT macro will issue SUBMIT then END.

Also, see the EDIT manual for BUILTIN macro service.

In this example, END, RETURN, and EXIT, are only caught during that one edit session.

Note: you should determine the status of the AUTOSAVE setting.
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 27, 2010 8:33 pm
Reply with quote

Pedro,

thanks for your idea,but I don't know how to use Edit MACRO and at the moment don't have time to learn it,but if I have time I have to see the reference...

do you or does someone else have other ideas?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 27, 2010 8:49 pm
Reply with quote

Hello,

Quote:
and at the moment don't have time to learn it
Then maybe this should wait until you do have time (or make time). . .

Until you have implemented proper code, you might just use the commands rather than function keys. . .

Possibly i misunderstand icon_confused.gif
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top