View previous topic :: View next topic |
Author |
Message |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Feb 13, 2003 8:17 am Post subject: Find if opened in View or Edit |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Thu Feb 13, 2003 9:37 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Feb 13, 2003 9:39 am Post subject: |
|
|
There is an edit macro command that will tell you called SESSION. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Feb 13, 2003 9:53 am Post subject: |
|
|
Thanks Offer and semigezer. |
|
Back to top |
|
 |
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Thu Feb 13, 2003 1:14 pm Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Feb 13, 2003 4:42 pm Post subject: |
|
|
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 |
|
 |
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Thu Feb 13, 2003 6:12 pm Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Feb 13, 2003 6:40 pm Post subject: |
|
|
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 |
|
 |
|
|