Re: Lockwords On HFS Directory Files - Hewlett Packard

This is a discussion on Re: Lockwords On HFS Directory Files - Hewlett Packard ; Um, does this mean I've discovered a bug in our wonderful MPEiX operating system? Bummer.... My AIF routines will AIFFILEGPUT and AIFFILEGGET the lockword ok but my Cobol app that calls the MPEiX intrinsic "FOPEN" fails every time with an ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Lockwords On HFS Directory Files

  1. Re: Lockwords On HFS Directory Files

    Um, does this mean I've discovered a bug in our wonderful MPEiX operating
    system? Bummer....


    My AIF routines will AIFFILEGPUT and AIFFILEGGET the lockword ok
    but my Cobol app that calls the MPEiX intrinsic "FOPEN" fails every time
    with an error code of 397 (A COMPONENT IN THE PATHNAME IS NOT A DIRECTORY
    (FSERR 397) so my app can't even open the file anymore.

    My file name construct for my FOPEN includes the lockword (if one exists)

    The construct would be --

    /SYS/PUB/SNTINL006 (no lockword) -- this file FOPEN's ok
    /SYS/PUB/SNTINL005/ZTOGDPKZ -- with lockword the FOPEN fails
    with the 397 error code....


    Brian.


    On Tue, 10 Jun 2008 22:50:02 -0400, Brian Donaldson wrote:

    >I used the AIF procedure AIFFILEGPUT to put a random lockword on the
    >HFS directory file.
    >
    >So I used the AIF procedure AIFFILEGGET to get the lockword and it
    >gave me the lockword ok.
    >
    >However, I cannot purge the file as you can see.....
    >
    >
    >xeq sh.hpbin.sys -L
    >################################################## ######################
    >
    > MPE/iX Shell and Utilities (A.50.02)
    > COPYRIGHT (c) Hewlett-Packard Company 1992, All Rights Reserved.
    >
    >################################################## ######################
    >
    >
    >shell/iX> rm /SYS/PUB/SNTINL005/ZTOGDPKZ
    >rm: cannot unlink entry "/SYS/PUB/SNTINL005/ZTOGDPKZ": Not a directory
    >shell/iX>
    >
    >
    >So, then I tried --
    >
    >file x=/SYS/PUB/SNTINL005/ZTOGDPKZ
    >urge *x
    >A COMPONENT IN THE PATHNAME IS NOT A DIRECTORY (FSERR 397)
    >Unable to purge file "*X". (CIERR 384)
    >
    >
    >
    >Ho hum,
    >Brian.
    >
    >
    >On Wed, 11 Jun 2008 00:19:48 +0000, Fairchild, Craig D
    > wrote:
    >
    >>Hi Brian,
    >>
    >>First, I'd be really interested to find out how you got a lockword on an

    >HFS syntax file name. I can't find a way to do that. It's not supposed to be
    >allowed.
    >>
    >>Assuming you managed to get a lockword on a file in the HFS namespace (I

    >used debug creatively to make it happen), I found the following command
    >sequence would allow such a file to be purged (from the CI prompt):
    >>
    >>:FILE X=/SYS/PUB/SNTINL005
    >>:PURGE *X/LOCKWORD <-- fill in your lockword of course
    >>:LISTFILE ./SYS/PUB/SNTINL005
    >>
    >>Take Care,
    >>Craig
    >>
    >>> -----Original Message-----
    >>> From: HP-3000 Systems Discussion
    >>> [mailto:HP3000-L@RAVEN.UTC.EDU] On Behalf Of Brian Donaldson
    >>> Sent: Tuesday, June 10, 2008 3:41 PM
    >>> To: HP3000-L@RAVEN.UTC.EDU
    >>> Subject: [HP3000-L] Lockwords On HFS Directory Files
    >>>
    >>> I built a file in the HFS directory in a Cobol program with
    >>> the COMMAND intrinsic. No problem, worked ok.
    >>>
    >>> Then I tried to put a lockword on the file. Afterwards it
    >>> became quite obvious that lockwording is a "no-no" with HFS files.
    >>>
    >>> I tried to purge the file at the colon prompt and also inside MPEX.
    >>> No can do. Cannot purge the file!
    >>>
    >>> Anyone know how to purge this file from the HFS directory?
    >>>
    >>> TIA,
    >>> Brian.
    >>>
    >>>
    >>>
    >>>
    >>> :LISTFILE /SYS/PUB/SNTINL005,-3
    >>> ********************
    >>> FILE: /SYS/PUB/SNTINL005
    >>>
    >>> FILE CODE : 0 FOPTIONS: ASCII,FIXED,NOCCTL,STD
    >>> BLK FACTOR: 1 OWNER : MANAGER.SYS
    >>> REC SIZE: 2252(BYTES) GROUP ID: SYS
    >>> BLK SIZE: 2252(BYTES) SECURITY--READ : ANY
    >>> EXT SIZE: 0(SECT) WRITE : ANY
    >>> NUM REC: 2 APPEND : ANY
    >>> NUM SEC: 256 LOCK : ANY
    >>> NUM EXT: 1 EXECUTE : ANY
    >>> MAX REC: 50000 **SECURITY IS ON
    >>> FLAGS : NO ACCESSORS
    >>> NUM LABELS: 0 CREATED : TUE, JUN 10, 2008, 2:23 PM
    >>> MAX LABELS: 0 MODIFIED: TUE, JUN 10, 2008, 3:11 PM
    >>> DISC DEV #: 1 ACCESSED: TUE, JUN 10, 2008, 3:11 PM
    >>> SEC OFFSET: 0 LABEL ADDR: $00000013.$00588C20
    >>> VOLCLASS : MPEXL_SYSTEM_VOLUME_SETISC
    >>>
    >>>
    >>> :MPEX
    >>>
    >>> MPEX/3000 29N00420 (c) VESOFT Inc, 1980 6.5 03:04918 For
    >>> help type 'HELP'
    >>>
    >>> Hint: Balance the load on your discs -- move files around
    >>> with %ALTFILE ;DEV=.
    >>>
    >>> %PURGE /SYS/PUB/SNTINL005
    >>> -----Will purge /SYS/PUB/SNTINL005 (code "", type FA, EOF 2,
    >>> 256 sectors)
    >>> 256 sectors will be saved
    >>> OK to purge 1 file (y/N)? Y
    >>> -----Purging /SYS/PUB/SNTINL005 (256 sectors)
    >>> Error: Doing Fopen of /SYS/PUB/SNTINL005.
    >>> Lockword on file being referenced cannot be specified.
    >>> File System message 340
    >>> %
    >>>
    >>> * To join/leave the list, search archives, change list settings, *
    >>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
    >>>

    >>
    >>* To join/leave the list, search archives, change list settings, *
    >>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

    >
    >* To join/leave the list, search archives, change list settings, *
    >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: Lockwords On HFS Directory Files

    Brian Donaldson wrote:
    > The construct would be --
    >
    > /SYS/PUB/SNTINL006 (no lockword) -- this file FOPEN's ok
    > /SYS/PUB/SNTINL005/ZTOGDPKZ -- with lockword the FOPEN fails


    Fairchild, Craig D wrote:
    > :FILE X=/SYS/PUB/SNTINL005
    > :PURGE *X/LOCKWORD <-- fill in your lockword of course
    > :LISTFILE ./SYS/PUB/SNTINL005


    Just in passing, and not having tried,
    I assumed part of the reasoning of no lockwords in HFS names
    is because of the syntax clashing.
    The "/lockword" looks like a file/folder name in HFS.

    All HFS parsing would see the filename as a directory, and the
    lockword as a file in that directory.

    I was thinking about the answer that Craig shows.
    I suppose in posix, a file utility could be provided that puts
    lockwords on a file (via AIF maybe).
    But then the open code would have to be enhanced to check for it.

    .... but of course, there must be some MPE special code
    already in open to handle MPE (non-posix) files...
    Keven

    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread