View previous topic :: View next topic
|
Author |
Message |
henry888
New User
Joined: 21 Sep 2009 Posts: 51 Location: china
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
henry888
New User
Joined: 21 Sep 2009 Posts: 51 Location: china
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
henry888
New User
Joined: 21 Sep 2009 Posts: 51 Location: china
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
|