Strange occurance when mixing "set proc/unit=byte" and pipe - VMS

This is a discussion on Strange occurance when mixing "set proc/unit=byte" and pipe - VMS ; I noticed a very strange (reproducible) bug today on both V7.3-2 and v8.3-1h1 Do the following: $ set proc/unit=byte $ sho dev d/mou ! this is fine -- the free space shows as bytes $ pipe sho dev d/mou ! ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Strange occurance when mixing "set proc/unit=byte" and pipe

  1. Strange occurance when mixing "set proc/unit=byte" and pipe

    I noticed a very strange (reproducible) bug today on both V7.3-2 and v8.3-1h1

    Do the following:

    $ set proc/unit=byte
    $ sho dev d/mou ! this is fine -- the free space shows as bytes
    $ pipe sho dev d/mou ! this is also fine
    $ pipe sho dev d/mou | type sys$pipe ! what happened? the free space
    shows as blocks
    $ pipe sho dev d/mou/un=by | type sys$pipe ! ok again, but I shouldn't
    have do that

    This also happens when you pipe the output of the directory/size
    command to another process.

    I've also post this on the ITRC forums at


    Ken

  2. Re: Strange occurance when mixing "set proc/unit=byte" and pipe

    On Sep 25, 12:19*am, "Ken Robinson" wrote:
    > I noticed a very strange (reproducible) bug today on both V7.3-2 and v8.3-1h1
    >
    > Do the following:
    >
    > $ set proc/unit=byte
    > $ sho dev d/mou *! *this is fine -- the free space shows as bytes
    > $ pipe sho dev d/mou ! this is also fine
    > $ pipe sho dev d/mou | type sys$pipe *! what happened? the free space
    > shows as blocks
    > $ pipe sho dev d/mou/un=by | type sys$pipe ! ok again, but I shouldn't
    > have do that
    >
    > This also happens when you pipe the output of the directory/size
    > command to another process.
    >
    > I've also post this on the ITRC forums at
    >
    >
    > Ken


    [From my ITRC Forum posting to the thread referenced in the OP]

    Ken,

    I agree with Steve and Willem.

    This is one of those debates about what the proper things to propagate
    when SPAWN is invoked. There is an argument for a greater set of
    process parameters to be "cloned" when a SPAWN is done, i.e., there is
    a strong argument that a whole set of settable parameters should be
    cloned, or at least the default should be that they are cloned. Among
    these parameters are RMS parameters, and various process settings.
    Insofar as I recall, only the DEFAULT string, symbols, and process
    logical names are cloned.

    I suspect that you are not the first to notice this inconsistency.

    Perhaps a "feature" request to Engineering for SET PROCESS/
    SPAWN_MODE=CLONE|RAW or SET PROCESS/SPAWN=([NO]LOGICAL_NAME,[NO]RMS,
    [NO]SYMBOL, [NO]SETTINGS])?

    - Bob Gezelter, http://www.rlgsc.com

  3. Re: Strange occurance when mixing "set proc/unit=byte" and pipe

    In article <7dd80f60809242119u65f4dc99o920d50298cb6724c@mail.g mail.com>, "Ken Robinson" writes:

    > $ pipe sho dev d/mou | type sys$pipe ! what happened? the free space
    > shows as blocks


    Per process flag is appearently not being passed to subprocesses by
    spawn. Generally speaking spawn does pass such things, so IMHO, its
    a bug. But I haven't had time to check whether it's a documented
    behaviour. If it's documented to behave this way then it's not a
    bug.


  4. RE: Strange occurance when mixing "set proc/unit=byte" and pipe

    >...
    > $ set proc/unit=byte
    > $ sho dev d/mou ! this is fine -- the free space shows as bytes
    > $ pipe sho dev d/mou ! this is also fine
    > $ pipe sho dev d/mou | type sys$pipe ! what happened? the free space
    > shows as blocks
    >...


    Creating a new process is resource intensive in VMS so PIPE is smart enough
    to not create a process if it has nothing to do. Try

    $ PIPE SHOW PROCESS/ACCOUNTING
    $ PIPE SHOW PROCESS/ACCOUNTING | TYPE SYS$PIPE

    The first one is the same as "SHOW PROCESS/ACCOUNTING" and the PIPE is
    ignored. The second one creates a new sub-process.

    SET PROCESS/UNIT=BYTE is not carried on to the new process when it is
    created.


    Peter Weaver
    www.weaverconsulting.ca www.openvmsvirtualization.com
    www.vaxvirtualization.com www.alphavirtualization.com
    Winner of the 2007 OpenVMS.org Readers' Choice Award for System
    Management/Performance



+ Reply to Thread