MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to open a file for edit (as in ISPF option 2) in REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Vodkasoda
Beginner


Joined: 23 Jan 2004
Posts: 19
Topics: 6
Location: Dublin

PostPosted: Fri Feb 11, 2005 9:36 am    Post subject: How to open a file for edit (as in ISPF option 2) in REXX Reply with quote

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
View user's profile Send private message Send e-mail
Vodkasoda
Beginner


Joined: 23 Jan 2004
Posts: 19
Topics: 6
Location: Dublin

PostPosted: Fri Feb 11, 2005 9:38 am    Post subject: Reply with quote

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 Embarassed !!!
Back to top
View user's profile Send private message Send e-mail
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Feb 11, 2005 9:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Vodkasoda
Beginner


Joined: 23 Jan 2004
Posts: 19
Topics: 6
Location: Dublin

PostPosted: Fri Feb 11, 2005 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 11, 2005 5:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Kathi
Beginner


Joined: 14 May 2003
Posts: 25
Topics: 0
Location: Mission Viejo, California

PostPosted: Sat Feb 12, 2005 2:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Vodkasoda
Beginner


Joined: 23 Jan 2004
Posts: 19
Topics: 6
Location: Dublin

PostPosted: Fri Feb 18, 2005 4:14 am    Post subject: Reply with quote

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 ... Embarassed
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group