View previous topic :: View next topic |
Author |
Message |
Vodkasoda Beginner
Joined: 23 Jan 2004 Posts: 19 Topics: 6 Location: Dublin
|
Posted: Fri Feb 11, 2005 9:36 am Post subject: How to open a file for edit (as in ISPF option 2) in REXX |
|
|
I am trying to automate & therefore simplify a manual task that we undertake here. BUT, I need to open a file for editing as per ISPF option 2.
If this isn't possible, fine, I'll find another (and probably better !!!) way to do it, but the quickest and most straightforward option is obviously my first choice ...
Can it be done ? |
|
Back to top |
|
|
Vodkasoda Beginner
Joined: 23 Jan 2004 Posts: 19 Topics: 6 Location: Dublin
|
Posted: Fri Feb 11, 2005 9:38 am Post subject: |
|
|
Of course, what I meant to say, was "I need to open a file for editing as per ISPF option 2, from within my REXX executable" !!!
Hope that's clearer !!! |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Feb 11, 2005 9:48 am Post subject: |
|
|
As you are editing your REXX program, and you type MODEL on the command line (in order to add data from an ISPF model) along with the insertion point, you will see the screen of all of the REXX models. In the right-hand column there is a section called "Miscellaneous". Note the options here:
M1 SELECT
M2 CONTROL
M3 BROWSE
M4 EDIT
M5 LOG
M6 GETMSG
M7 EDREC
M8 LIBDEF
M9 LIST
M10 VIEW
...
etc. Select option "M4" for EDIT.
Now, the contents of the EDIT ISPF model have been pasted into your edit session. Select the best option for your needs (probably the first option, which is:
Code: |
ADDRESS ISPEXEC
"EDIT DATASET('dsname')"
or
"ISPEXEC EDIT DATASET('dsname')"
|
|
|
Back to top |
|
|
Vodkasoda Beginner
Joined: 23 Jan 2004 Posts: 19 Topics: 6 Location: Dublin
|
Posted: Fri Feb 11, 2005 9:58 am Post subject: |
|
|
WOW ... never knew about that, but then I'm like that with most things as I don't go on courses, I just do things off my own back ... I'll see if that helps, thanks ... |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 11, 2005 5:36 pm Post subject: |
|
|
THe next thing you will need is to have a basic understanding of edit macros, so have a look at the ISPF Edit and Edit Macros book (or just search the net for ISREDIT and you'll find many examples) |
|
Back to top |
|
|
Kathi Beginner
Joined: 14 May 2003 Posts: 25 Topics: 0 Location: Mission Viejo, California
|
Posted: Sat Feb 12, 2005 2:15 am Post subject: |
|
|
You might try the following:
Code: | ADDRESS ISPEXEC "EDIT DATASET(datasetname) " |
where datasetname is unqualified. Use
Code: | ADDRESS ISPEXEC "EDIT DATASET('"datasetname"') " |
if you fully qualify the name. |
|
Back to top |
|
|
Vodkasoda Beginner
Joined: 23 Jan 2004 Posts: 19 Topics: 6 Location: Dublin
|
Posted: Fri Feb 18, 2005 4:14 am Post subject: |
|
|
Apologies to all who replied for not getting back sooner, I've been snowed under on other stuff, but I'll have alook at your ideas and suggestions ASAP ... |
|
Back to top |
|
|
|
|