View previous topic :: View next topic
|
Author |
Message |
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
I have a requirement to to figure out a way to execute an edited Rexx exec from ISPF Edit. Is this possible to do without saving? The issue is that we need to make changes, execute, make more changes, execute, etc. It would be nice if this could be done with out needed to create and maintain multiple versions.
Thanks very much. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
AllenSieracki wrote: |
I have a requirement to to figure out a way to execute an edited Rexx exec from ISPF Edit. Is this possible to do without saving? The issue is that we need to make changes, execute, make more changes, execute, etc. It would be nice if this could be done with out needed to create and maintain multiple versions.
Thanks very much. |
Who provided you with such stupid "requirement"??? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Do it the standard way: make a copy and play with the copy. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks Nic. Seems like there isn't a way to do what I'm asking.
So the steps would be:
1. Make a copy
2. Edit the copy
3. Save the copy
4. Execute the copy
5. Delete the copy.
6. Repeat.
Is there a way to streamline this? For instance could we make the edits and then run an ISPF Edit Macro to save as a temp file and execute? The SAVE command doesn't seem to have the option to save to a temp file.
Thanks |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
I would not edit the production data set itself because other people might be using it. You are playing with fire.
You need to look at your SYSPROC or SYSEXEC concatenation. You should have a private data set concatenated ahead of your production data set.
The order should be:
1. Copy member from production to private data set
2. Edit the copy
3. Save the copy
4. Execute the copy
5.
6. Repeat 2-4
When you are satisfied with your changes:
1. compare with the production data set member to make sure someone else has not made changes at the same time as you. It happens.
2. optional: have a team member review your changes.
3. rename the old production member so you have a backup. (It is easier to back out your defect-laden changes - spoken from experience)
4. MOVE member from private to production data set.
Of course, it would be better if you used software control program like SCLM to manage all of this. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
figure out a way to execute an edited Rexx exec from ISPF Edit |
Your situation is not clear, but in a similar situation, I learned to use two separate userids that are logged on simultaneously.
1. On one userid, I was editing the macro (and saving)
2. On the second userid, I could edit the target data and could execute the macro. This userid needs to have the macro in the SYSPROC or SYSEXEC concatenation. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks Pedro. I'm familiar with our SYSPROC concatenation and have created/edited a few execs. I'm also familiar with production code precautions. In this case, it's not that sensitive.
Would the following make sense or be possible? I'm trying to limit the user steps as much as possible.
1. Rexx Exec executed from member list makes temporary copy
2. Rexx Exec opens copy in Edit mode.
3. User makes edits and saves copy
4. Rexx Exec continues and executes saved copy
Thanks |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
I am not sure that your current plan is feasible...
You can start the editor, but your rexx exec does not continue executing until the editor ends.
Your earlier comments said you were editing an ISPF editor macro. It can be done, but executing the macro is another level of complexity that you need to consider.
Some suggestions:
- make the temporary copy only if it does not already exist.
- make one exec that makes the copy and launches the editor
- make a second exec that executes the copy. Actually, it could be the same exec if you have logic to keep track of the status. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks again Pedro. In step 4, there is no further editing to be done. The saved copy just needs to be executed. The saved copy is another edit macro but the first exec will have done its job and can exit.
I like your idea of trying to combine this exec with the other exec. Will ponder this some more.
I also found a REPLACE command. From the manual:
The REPLACE primary command replaces a sequential data set, member of a partitioned data set, or z/OSĀ® UNIX file with data you are editing. If a member or z/OS UNIX file you want to replace does not exist, the editor creates it. The editor cannot create a new sequential data set.
This looks like it might do what I need. Will try. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
AllenSieracki wrote: |
Thanks Nic. Seems like there isn't a way to do what I'm asking.
So the steps would be:
1. Make a copy
2. Edit the copy
3. Save the copy
4. Execute the copy
5. Delete the copy.
6. Repeat.
Is there a way to streamline this? For instance could we make the edits and then run an ISPF Edit Macro to save as a temp file and execute? The SAVE command doesn't seem to have the option to save to a temp file. |
Flucking 'ell, you're telling what needs to be done. It shouldn't be very hard to actually write an exec or even an edit macro to just this. It would probably take me longer to start up my z/OS system than writing the code...
And why the effing 'ell can't you make all changes in one go?
Maybe next time you should first explain the (il)logic behind such a "requirement", so that we don't have to waste our time figuring out what you want! |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
@Willy: Please fix the Link destination. It's invalid. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks very much Willy. I will need to study this more but after a quick review, it looks like it will work very well for my purposes. Thanks very much for posting.
Allen |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
why the effing 'ell can't you make all changes in one go? |
I have written some editor macros that were hundreds of lines long. Like any other program, it might take some bit of debugging to get to run to your satisfaction. |
|
Back to top |
|
|
|