Why no OPEN/USER ?

Why no OPEN/USER ?

Post by Hein RMS van den Heuv » Tue, 07 Nov 1995 04:00:00




:

Quote:>   but we have no AUTOMATIC measure of closing an open file and
>   deassigning its logical when the DCL command procedure exits (short
>   of using ON ERROR and ON CONTROL_Y, etc.)

 :

I use CLOSE /NOLOG on any logical name the procudere is about to open.
Yes, a switch like /CLOSE_FIRST or /RE_OPEN on the OPEN or perhaps an
environment variable to switch to sduch behaviour would be nice to. Where
would such enhancement be in the grand VMS priority list? Pretty low IMHO.

Hope this helps,                +--------------------------------------+
Hein van den Heuvel, Digital.   | All opinions expressed are mine, and |
  "Makers of VMS and other | may not reflect those of my employer |
   fine Operating Systems."        +--------------------------------------+

 
 
 

Why no OPEN/USER ?

Post by FRED W. BACH , TRIUMF Operatio » Tue, 07 Nov 1995 04:00:00



#

#:
#>   but we have no AUTOMATIC measure of closing an open file and
#>   deassigning its logical when the DCL command procedure exits (short
#>   of using ON ERROR and ON CONTROL_Y, etc.)
# :
#
#I use CLOSE /NOLOG on any logical name the procudere is about to open.
#Yes, a switch like /CLOSE_FIRST or /RE_OPEN on the OPEN or perhaps an
#environment variable to switch to sduch behaviour would be nice to. Where
#would such enhancement be in the grand VMS priority list? Pretty low IMHO.
#
#Hope this helps,               +--------------------------------------+
#Hein van den Heuvel, Digital.  | All opinions expressed are mine, and |
#  "Makers of VMS and other        | may not reflect those of my employer |
#   fine Operating Systems."       +--------------------------------------+

   Hein,

   I have also suggested OPEN/PROCEDURE.  Of course, there are
   error-handling and ctrl-Y handling exit routines which we can write
   to close all open files and delete all unneeded logicals, but on a
   SEVERE_ERROR one usually should not do anything except EXIT or
   STOP, IMHO.  Then, given an open file and a severe error, the file
   remains open.  If the procedure is called again, sure it can close
   the file and delete the logical and start again.  But if the
   procedure is not called again, the open file and the existence of
   the logical pointing to is *can* foul up other DCL procedures or
   even images.  Hence the need for OPEN/USER  and/or  OPEN/PROCEDURE.

   I'm just fielding ideas here, of course, based on problems I have
   seen or things I want to do and code I want to port.  But the input
   has been quite useful.  Thanks to all of you.


 TRIUMF (TRI-University Meson Facility) |  Voice:  604-222-1047 loc 6327/6278
 4004 WESBROOK MALL, UBC CAMPUS         |  FAX:    604-222-1074
 University of British Columbia, Vancouver, B.C., CANADA   V6T 2A3
  Damien says " If you don't STAND for SOMETHING, you'll FALL for ANYTHING "
 These are my opinions, which should ONLY make you read, think, and question.
 They do NOT necessarily reflect the views of my employer or fellow workers.

 
 
 

1. Why no OPEN/USER



        [cut]

        Yes and this is what I had done for the longest time until
        I stumbled upon this:

         $ if f$trnlnm("input_file") .nes. "" then close input_file
         $ OPEN/READ INPUT_FILE TRNTO::DBA0:[COST]INVENTORY.DAT
         $ READ_LOOP:
         $ READ/END_OF_FILE=ENDIT  INPUT_FILE  NUM
         $ FIRST_CHAR = F$EXTRACT(0,1,NUM)
         $ WRITE SYS$OUTPUT FIRST_CHAR
         $ GOTO READ_LOOP
         $ ENDIT:
         $ CLOSE INPUT_FILE

        This is a $ help open example    with one twist.  That f$trnlnm
        saves the day.
        Takes away all that mindless checking.

                                Rob

2. Win9x: File converter wanted

3. Why are these files open?

4. Disallowing programs in .forward files.

5. Can't open display... Why??

6. Razor

7. Why dont open online manuals to everybody?

8. DNS Matchname problem

9. Why does -one- user keep getting '6 failures since last login'?

10. Why no system service to create/delete user account...

11. How to delete a file kept open by a user/process

12. Logout idle users is Open VMS

13. Tracing users of an open program