View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I have written one rexx macro to enlist the copybooks from cobol program.
But i want to restrict its use to use it only in VIEW mode.
Is there any command to check if the mode of the current working member/cobol program is VIEW/EDIT ?
If anyone has opened code in EDIT mode then display error message and utility should not proceed. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
No built-in command that I can find. You could VGET the ZSCREENI variable to obtain the screen data and check that for the 'VIEW' or 'EDIT' text. |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
ahh.. great idea. let me hit try n let you know |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Code: |
"isredit (MODE) = session" |
RTFM next time! |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
Thanks, both ideas worked fine.
Got the targettt !! |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
@prino, did scan the manual, but overlooked that one, obviously time for new glasses. Or it was a case of senior moment. Anyway, thanks for the info. |
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
I believe you just worry, that your macro in EDIT mode can save the changes, when you hit PF3 - the solution is use ALIAS on the end of macro - in this case you can run it in VIEW and EDIT with the same result
Code: |
ADDRESS ISREDIT
"DEFINE END ALIAS CANCEL"
"DEFINE SAVE ALIAS CANCEL"
|
|
|
Back to top |
|
|
|