Re: Appending in a file - VMS

This is a discussion on Re: Appending in a file - VMS ; Doug Phillips wrote on 08/02/2007 09:54:32 PM: > On Aug 2, 7:31 pm, apogeusiste...@gmail.com wrote: > > On 2 ago, 19:15, Doug Phillips wrote: > > > > > > > > > On Aug 2, 3:58 pm, apogeusiste...@gmail.com wrote: ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Re: Appending in a file

  1. Re: Appending in a file



    Doug Phillips wrote on 08/02/2007 09:54:32 PM:

    > On Aug 2, 7:31 pm, apogeusiste...@gmail.com wrote:
    > > On 2 ago, 19:15, Doug Phillips wrote:
    > >
    > >
    > >
    > > > On Aug 2, 3:58 pm, apogeusiste...@gmail.com wrote:

    > >
    > > > > On 2 ago, 16:55, VAXman- @SendSpamHere.ORG wrote:

    > >
    > > > > > In article <46b24e8...@news.langstoeger.at>, pe...

    > @langstoeger.at (Peter 'EPLAN' LANGSTOeGER) writes:
    > >
    > > > > > >In article <9plsi.23$b72...@newsfe12.lga>, VAXman-

    > @SendSpamHere.ORG writes:
    > > > > > >>In article <1186060603.611891.242...@19g2000hsx.

    > googlegroups.com>, apogeusiste...@gmail.com writes:
    > > > > > >>Seems silly but....

    > >
    > > > > > >>$ PIPE WRITE SYS$OUTPUT "''F$time()'" | APPEND SYS$PIPE

    FILE.DAT
    > >
    > > > > > >>FILE.DAT must be created first.

    > >
    > > > > > >No. Use APPEND/NEW

    > >
    > > > > > Right! /NEW is create _IF_ it doesn't exist. Sorry, I'm

    > suffering a HUGE
    > > > > > amount of undue heavy stress here which tends to fog the memory.

    > >
    > > > > > --
    > > > > > VAXman- A Bored Certified VMS Kernel Mode Hacker

    > VAXman(at)TMESIS(dot)COM
    > >
    > > > > > "Well my son, life is like a beanstalk, isn't it?"

    > >
    > > > > >http://tmesis.com/drat.html

    > >
    > > > > I use VAX/VMS V5.5-2H4, and it doesn´t haves pipe...
    > > > > What do you suggest ?

    > >
    > > > There's the freeware ADV_PIPE

    > >
    > > > available here:
    > > >

    > >
    > > > or here:
    > > >

    > >
    > > > If you can't use freeware on your system, but you insist on having a
    > > > one-liner, put the DCL commands in a .com file and assign it as a
    > > > foreign command.- Ocultar texto entre aspas -

    > >
    > > > - Mostrar texto entre aspas -

    > >
    > > I have adv_pipe in my system, but how append in a file ?
    > >
    > > VAX1 » pipe sh day > x.x
    > > VAX1 » ty x.x
    > > 2-AUG-2007 21:26:39
    > > VAX1 » pipe sh day > x.x
    > > VAX1 » ty x.x
    > > 2-AUG-2007 21:26:43
    > > VAX1 » pipe sh day >> x.x
    > > Syntax error
    > > VAX1 »

    >
    > It's been a while since I last used adv_pipe, and I don't have it
    > handy on any system. Use the pipe separator to cause the output of a
    > command to be avaialable as the input to the next. VMS's sys$output is
    > equiv to *nix's stdout and sys$input is equiv to stdin. You don't want
    > to "redirect" the output, you want to "pipe" it.
    >
    > Try the command some others gave you, except substitute sys$input for
    > sys$pipe
    >
    > $pipe write sys$output "''f$time()'" | append/new sys$input x.x
    >
    > Otherwise, if that doesn't work, you'll need to read the help.
    >


    : I don't recall if it was in V5.5-2*, but maybe
    : SET PROMPT would give the timestamp information needed without any
    append.

    Of course I meant SET PREFIX


  2. Re: Appending in a file

    On Aug 3, 11:50 am, norm.raph...@metso.com wrote:
    > Doug Phillips wrote on 08/02/2007 09:54:32 PM:
    >
    >
    >
    >
    >
    > > On Aug 2, 7:31 pm, apogeusiste...@gmail.com wrote:
    > > > On 2 ago, 19:15, Doug Phillips wrote:

    >
    > > > > On Aug 2, 3:58 pm, apogeusiste...@gmail.com wrote:

    >
    > > > > > On 2 ago, 16:55, VAXman- @SendSpamHere.ORG wrote:

    >
    > > > > > > In article <46b24e8...@news.langstoeger.at>, pe...

    > > @langstoeger.at (Peter 'EPLAN' LANGSTOeGER) writes:

    >
    > > > > > > >In article <9plsi.23$b72...@newsfe12.lga>, VAXman-

    > > @SendSpamHere.ORG writes:
    > > > > > > >>In article <1186060603.611891.242...@19g2000hsx.

    > > googlegroups.com>, apogeusiste...@gmail.com writes:
    > > > > > > >>Seems silly but....

    >
    > > > > > > >>$ PIPE WRITE SYS$OUTPUT "''F$time()'" | APPEND SYS$PIPE

    > FILE.DAT
    >
    > > > > > > >>FILE.DAT must be created first.

    >
    > > > > > > >No. Use APPEND/NEW

    >
    > > > > > > Right! /NEW is create _IF_ it doesn't exist. Sorry, I'm

    > > suffering a HUGE
    > > > > > > amount of undue heavy stress here which tends to fog the memory.

    >
    > > > > > > --
    > > > > > > VAXman- A Bored Certified VMS Kernel Mode Hacker

    > > VAXman(at)TMESIS(dot)COM

    >
    > > > > > > "Well my son, life is like a beanstalk, isn't it?"

    >
    > > > > > >http://tmesis.com/drat.html

    >
    > > > > > I use VAX/VMS V5.5-2H4, and it doesn´t haves pipe...
    > > > > > What do you suggest ?

    >
    > > > > There's the freeware ADV_PIPE

    >
    > > > > available here:
    > > > >

    >
    > > > > or here:
    > > > >

    >
    > > > > If you can't use freeware on your system, but you insist on having a
    > > > > one-liner, put the DCL commands in a .com file and assign it as a
    > > > > foreign command.- Ocultar texto entre aspas -

    >
    > > > > - Mostrar texto entre aspas -

    >
    > > > I have adv_pipe in my system, but how append in a file ?

    >
    > > > VAX1 » pipe sh day > x.x
    > > > VAX1 » ty x.x
    > > > 2-AUG-2007 21:26:39
    > > > VAX1 » pipe sh day > x.x
    > > > VAX1 » ty x.x
    > > > 2-AUG-2007 21:26:43
    > > > VAX1 » pipe sh day >> x.x
    > > > Syntax error
    > > > VAX1 »

    >
    > > It's been a while since I last used adv_pipe, and I don't have it
    > > handy on any system. Use the pipe separator to cause the output of a
    > > command to be avaialable as the input to the next. VMS's sys$output is
    > > equiv to *nix's stdout and sys$input is equiv to stdin. You don't want
    > > to "redirect" the output, you want to "pipe" it.

    >
    > > Try the command some others gave you, except substitute sys$input for
    > > sys$pipe

    >
    > > $pipe write sys$output "''f$time()'" | append/new sys$input x.x

    >
    > > Otherwise, if that doesn't work, you'll need to read the help.

    >
    > : I don't recall if it was in V5.5-2*, but maybe
    > : SET PROMPT would give the timestamp information needed without any
    > append.
    >
    > Of course I meant SET PREFIX


    Without knowing what the OP is really trying to do (like you, I
    guessed he's trying to enter a time-stamp into a log file), it's hard
    to tell. I can't go back further than v6.2 to see, anyway.

    For the heck of it I installed ADV_PIPE on a v6.2 VAX. It has some
    bugs in the install.com file, but nothing insurmountable.

    ADV_PIPE also doesn't seem to like the Write sys$output "''f$time()'"
    command, or any write to sys$output, for that matter. ISTR this
    MAILBOX "feature" back when, but I'm not going to spend time going
    through the old New features & Release Notes.

    With debug set:

    ..WORK>pipe write sys$output "''f$time()'" | append/new sys$input x.x
    $ CREATE/MAILBOX MBA4986:
    $ SPAWN/INPUT=MBA4986:/FLAGS=(NOWAIT,NOSYMBOLS,NOLOGICALS) APPEND/NEW
    SYS$INPUT X.X
    %SPAWN-I-INFO, PID = 0000017A, STATUS = 00000001, CNT = 1
    $ SPAWN/OUTPUT=MBA4986:/FLAGS=(NOSYMBOLS,NOLOGICALS) WRITE SYS$OUTPUT
    " 3-AUG-2007 13:09:27.43"
    %CLI-E-INVREQTYP, invalid request type

    It does work with:

    ..WORK>pipe show time | append/new sys$input x.x
    $ CREATE/MAILBOX MBA4993:
    $ SPAWN/INPUT=MBA4993:/FLAGS=(NOWAIT,NOSYMBOLS,NOLOGICALS) APPEND/NEW
    SYS$INPUT X.X
    %SPAWN-I-INFO, PID = 0000017B, STATUS = 00000001, CNT = 1
    $ SPAWN/OUTPUT=MBA4993:/FLAGS=(NOSYMBOLS,NOLOGICALS) SHOW TIME
    %SPAWN-I-INFO, PID = 0000017C, STATUS = 00030001

    (do it again)

    ..WORK>type x.x
    3-AUG-2007 12:47:53
    3-AUG-2007 12:48:31


    I can't find any way to use redirect > to append, though. As long as
    the file exists, or he can live with an error message on the first
    execution, then he could use copy/concat if he has some allergy to
    append.

    ADV_PIPE is so old I don't see it worth spending a lot of time messing
    with it.

    -----
    Pipes? Pipes? We don't need no stinkin' pipes! ;-)



  3. Re: Appending in a file

    On Fri, 3 Aug 2007, Doug Phillips wrote:

    > ADV_PIPE is so old I don't see it worth spending a lot of time
    > messing with it.


    Not to mention the fact that the copyright notice explicitly denies
    permission to make changes to any of the files.


    --

    Rob Brown b r o w n a t g m c l d o t c o m
    G. Michaels Consulting Ltd. (780)438-9343 (voice)
    Edmonton (780)437-3367 (FAX)
    http://gmcl.com/


  4. Re: Appending in a file

    On Aug 3, 1:50 pm, Rob Brown wrote:
    > On Fri, 3 Aug 2007, Doug Phillips wrote:
    > > ADV_PIPE is so old I don't see it worth spending a lot of time
    > > messing with it.

    >
    > Not to mention the fact that the copyright notice explicitly denies
    > permission to make changes to any of the files.
    >
    > --
    >



    Sure, but I doubt the copyrighters would refuse if someone asked
    permission and agreed to their restrictions. There might even be a
    newer version of ADV_PIPE someplace for all I know. But I have no need
    for ADV_PIPE, and I'm not that bored yet;-)



+ Reply to Thread