Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to get previous Key value in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: how to get previous Key value in REXX
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

Moderator Team Head


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

PostPosted: Thu May 27, 2010 4:37 pm    Post subject: Reply to: how to get previous Key value in REXX
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    Post subject:
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

Senior Member


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

PostPosted: Thu May 27, 2010 7:19 pm    Post subject: Reply to: how to get previous Key value in REXX
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    Post subject:
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

Site Director


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

PostPosted: Thu May 27, 2010 8:49 pm    Post subject:
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    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 Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us