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 

Find if opened in View or Edit

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


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Feb 13, 2003 8:17 am    Post subject: Find if opened in View or Edit Reply with quote

Hi,

Is there any edit macro command, or some REXX command, to find if the file is opened in view or edit mode.

Diba
Back to top
View user's profile Send private message Send e-mail
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Feb 13, 2003 9:37 am    Post subject: Reply with quote

Here is my way of doing this:
Code:

ADDRESS ISPEXEC "EDIT DATASET('your.pds(member)') MACRO(endmacro)"
SELECT
  WHEN RC = 14 THEN
     SAY "I'm in EDIT mode."
  WHEN RC =  4 THEN
     SAY "I'm in VIEW mode."
END


endmacro is a simple EDIT MACRO with a single command, "END"

Ofer
________
glass weed pipe


Last edited by ofer71 on Sat Feb 05, 2011 10:55 am; edited 1 time in total
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: Thu Feb 13, 2003 9:39 am    Post subject: Reply with quote

There is an edit macro command that will tell you called SESSION.
Back to top
View user's profile Send private message Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Feb 13, 2003 9:53 am    Post subject: Reply with quote

Thanks Offer and semigezer.
Back to top
View user's profile Send private message Send e-mail
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Thu Feb 13, 2003 1:14 pm    Post subject: Reply with quote

When I get into browse I see this:
Code:

   Menu  Utiliti
               
 BROWSE    K2536


when I get into edit I see this:
Code:

   File  Edit  E
               
 EDIT       K253


when I get into view I see this:
Code:

   File  Edit  Edi
                 
 VIEW       K25368



So what is the actual problem?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


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

PostPosted: Thu Feb 13, 2003 4:42 pm    Post subject: Reply with quote

The problem is writing a macro that is aware of the EDIT or VIEW state so the macro can know ahead of time if the data can be saved. It's a fairly common question, actually.
Back to top
View user's profile Send private message Visit poster's website
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Thu Feb 13, 2003 6:12 pm    Post subject: Reply with quote

I'm not expert with edit macros but it looks to me like the panel displayed for Browse is ISRBROBA. The panel displayed for Edit and View is ISREDDE2. It also looks like the Z variable ZVMODET is set to VIEW when the View option is in effect.

Can you try using the PANELID and Z variable to detect what is going on?

Matter of fact, I don't think you can run an edit macro in browse.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


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

PostPosted: Thu Feb 13, 2003 6:40 pm    Post subject: Reply with quote

Not browse, but VIEW which is basically edit without the ENQ. You can't depend on the panel name because there can be user defined edit panels as well as ISREDDE2 through 5, FLMEDDE2 through 5, and a few others. ISREDIT SESSION is the intended interface for this.
Back to top
View user's profile Send private message Visit poster's website
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