Operating System - OpenVMS
1827707 Members
2785 Online
109967 Solutions
New Discussion

Re: Exception handler for EDT$EDIT VMS-routine

 
SOLVED
Go to solution
Vladimir K. Vershinin
Frequent Advisor

Exception handler for EDT$EDIT VMS-routine

See C source in attachment.
4 REPLIES 4
Martin P.J. Zinser
Honored Contributor

Re: Exception handler for EDT$EDIT VMS-routine

Hello Vladimir,

I do not understand your question really.

Building and running your example program, one
gets an image that invokes edt to edit a file.

As per your description I've set this file to no access to the owner. Again invoking the
program the following error message is
generated

$ run temp

Ret - edit file XXX.YYY, ^Y - exit program:
%EDT-F-OPENIN, error opening US$ROOT:[EURMPZ]XXX.YYY; as input
-RMS-E-PRV, insufficient privilege or file protection violation
Ret - edit file XXX.YYY, ^Y - exit program:


That is IMHO expected behaviour, since the file is protected against write. So, can you please explain which behaviour you do want to achieve?

Greetings, Martin

P.S. For other forum members, you do need an
un-prived process to see this ;-)
Vladimir K. Vershinin
Frequent Advisor

Re: Exception handler for EDT$EDIT VMS-routine

Thank you for your reply, Martin!

If you run test and press Ret more then
once you see error message only once.

Greetings, Vladimir
John Gillings
Honored Contributor
Solution

Re: Exception handler for EDT$EDIT VMS-routine

Vladimir,

There's nothing "wrong" with your code.

Modify your program to capture the return status from EDT$EDIT and you'll see that on second and subsequent invokations, it's returning (decimal) 8749116.

This is a limitation of the EDT$EDIT routine. If the routine ever terminates with a severity E or F error, all subsequent attempts to invoke the routine will fail with status

%EDT-F-REENTRY, attempt to re-enter EDT

The EDT editor was made obselete with the release of TPU circa 1984 (20 years ago!). EDT has many restrictions and limitations, all of which are resolved by using a more modern editor.

Your specific issue was formally reported to OpenVMS engineering in 1990. The response was:

"SOLUTION:

OpenVMS engineering is no longer considering corrections to problems reported on EDT unless the problem is a regression from the release previous to the current shipping version of OpenVMS. Our current fully supported editor is TPU, which is the default editor for OpenVMS. EDT will continue to ship with OpenVMS to provide this editor, in its current working form, to those customers who prefer to use it.

WORKAROUND:

If possible, use another callable editor such as TPU or LSE.
"

Sorry!

Please modify your code to call TPU instead.
A crucible of informative mistakes
Vladimir K. Vershinin
Frequent Advisor

Re: Exception handler for EDT$EDIT VMS-routine

Thank you for your reply, John!

As I wrote in a comment to XXX.C it's
only a little fragment of a more big
program which I developed in 1991. Now I
have a lot of free time and want to
redesign my program and use in it a
more simple then TPU but fully functional editor by means of only ONE CALL. Hence, in accordance to your reply, if I want to
continue using EDT$EDIT I must trace EDTSHR code "on-the-fly" (as I wrote in a comment to XXX.C)... Or develop my own editor by
means of TPU (it will be possible in the
future).

Best regards,
Vladimir