Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: Need line counting program for Alpha OpenVMS
       [not found] <3470F85B.20B4@snipak.netik>
@ 1997-11-17  5:00 ` fairfield
  1997-11-18  5:00   ` Peter Prymmer
  1997-11-18  5:00 ` Petri Backstrom
  1997-11-23  5:00 ` Phillip Helbig
  2 siblings, 1 reply; 4+ messages in thread
From: fairfield @ 1997-11-17  5:00 UTC (permalink / raw)



In article <3470F85B.20B4@snipak.netik>, 
    			Peter Mroz <pmrozek@snipak.netik> writes:
> I need a fast line counting program.  I wrote a simple C program that
> reads a file in byte by byte, and increments a counter when it
> encounters a newline.  However, it's pretty slow on large files.  Has
> someone written a program that takes advantage of VMS system service
> calls to perform the same task?

        How about:

        	$ search/stat/out=nl:  the.file  ""

    It's very fast, and the number of records searched, i.e., the count
    of lines in the file, appear in the last line of the output.

> Also, I've got a version of the Unix "tail" command that runs under VMS,
> but not Alpha OpenVMS.  It's pretty handy for looking at the last n
> lines of a batch log file for a long running job.  Has anyone gotten
> this to work on Alpha OpenVMS?  I can post the source if anyone's
> interested.

        There are various TAIL  and  MORE,  etc., varients available for
    VMS.  However, since you mention Alpha, VMS since V6.1 (I think) has
    had  TYPE/TAIL[=nn]  and TYPE/PAGE (and TYPE/TAIL/PAGE, etc.)  which
    _mostly_ do the job.  TYPE/TAIL and TYPE/PAGE (in  fact,  the  /PAGE
    qualifier  to  a whole bunch of VMS verbs) first appeared in VMS 6.1
    (or 6.2, I don't  recall  which  at  the  moment)  on _both_ VAX and
    Alpha.

        Someone is bound to jump in here and point out that, for certain
    file organizations,  TYPE/TAIL  won't  work,  but  in  those (rare?)
    cases,  one of the freeware TAIL programs will do the job.  See  any
    of the fine VMS freeware sites in  your  area.   :-)  Andy  Harper's
    server,  ftp2.kcl.ac.uk, has two TAIL varients and two MORE varients
    (MOST and SMORE).  Hunter  Goatley's  server,  ftp.wku.edu, alos has
    SMORE nad MOST.

        So you really don't need  your  unix ports, VMS has them already
    (unless you're running on a very old version), either built in or as
    freeware.

        -Ken
-- 
 Kenneth H. Fairfield       |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 46  |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309       |  Voice:    650-926-2924    FAX: 650-926-3515
 -------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need line counting program for Alpha OpenVMS
       [not found] <3470F85B.20B4@snipak.netik>
  1997-11-17  5:00 ` Need line counting program for Alpha OpenVMS fairfield
@ 1997-11-18  5:00 ` Petri Backstrom
  1997-11-23  5:00 ` Phillip Helbig
  2 siblings, 0 replies; 4+ messages in thread
From: Petri Backstrom @ 1997-11-18  5:00 UTC (permalink / raw)



Peter Mroz wrote:

[snip]
 
> Also, I've got a version of the Unix "tail" command that runs under VMS,
> but not Alpha OpenVMS.  It's pretty handy for looking at the last n
> lines of a batch log file for a long running job.  Has anyone gotten
> this to work on Alpha OpenVMS?  I can post the source if anyone's
> interested.

Perhaps you should take a look at what current generations of 
the OpenVMS operating system document as valid qualifiers for 
the TYPE command?

E.g., try

   $ HELP TYPE /CONTINUOUS

for starters. ;-)

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need line counting program for Alpha OpenVMS
  1997-11-17  5:00 ` Need line counting program for Alpha OpenVMS fairfield
@ 1997-11-18  5:00   ` Peter Prymmer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Prymmer @ 1997-11-18  5:00 UTC (permalink / raw)
  To: fairfield


fairfield@sldb4.slac.stanford.edu wrote:

>         There are various TAIL  and  MORE,  etc., varients available for
>     VMS.  However, since you mention Alpha, VMS since V6.1 (I think) has
>     had  TYPE/TAIL[=nn]  and TYPE/PAGE (and TYPE/TAIL/PAGE, etc.)  which
>     _mostly_ do the job.  TYPE/TAIL and TYPE/PAGE (in  fact,  the  /PAGE
>     qualifier  to  a whole bunch of VMS verbs) first appeared in VMS 6.1
>     (or 6.2, I don't  recall  which  at  the  moment)  on _both_ VAX and
>     Alpha.

I do not recall TYPE/TAIL on 5.5-2 but I distinctly recall having
TYPE/PAGE on
VAX 5.5-2 since we had a global symbol in a commonly used LOGIN.COM
there:

  $ tp :== type/page

and I have gotten so accustomed to using that that I have to `alias tp
more` on 
unix boxes that I use (finger habits die slowly).

I am not sure about the relevance to the original poster's question but
I ought to 
put a plug in for MOST - it is indeed a great product for VMS.

Peter Prymmer
pvhp@forte.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need line counting program for Alpha OpenVMS
       [not found] <3470F85B.20B4@snipak.netik>
  1997-11-17  5:00 ` Need line counting program for Alpha OpenVMS fairfield
  1997-11-18  5:00 ` Petri Backstrom
@ 1997-11-23  5:00 ` Phillip Helbig
  2 siblings, 0 replies; 4+ messages in thread
From: Phillip Helbig @ 1997-11-23  5:00 UTC (permalink / raw)



In article <3470F85B.20B4@snipak.netik>, Peter Mroz
<pmrozek@snipak.netik> writes: 

> I need a fast line counting program.  

Is SEARCH "" fast enough?  Depending on what file types you have, this 
might be an option.

> Also, I've got a version of the Unix "tail" command that runs under VMS,
> but not Alpha OpenVMS.  It's pretty handy for looking at the last n
> lines of a batch log file for a long running job.  Has anyone gotten
> this to work on Alpha OpenVMS?  I can post the source if anyone's
> interested.

There is TYPE/TAIL on any version of VMS which runs on ALPHA.  However, 
the C programme I have which I used on VAX (haven't gotten around to 
recompiling it yet) is a bit more flexible in SOME ways.


--
Phillip Helbig                          Email ... helbig@multivac.jb.man.ac.uk
Nuffield Radio Astronomy Laboratories   Tel. ..... +44 1477 571 321 (ext. 297)
Jodrell Bank                            Fax ................. +44 1477 571 618
Macclesfield                            Telex ................. 36149 JODREL G
UK-Cheshire SK11 9DL                    Web .... http://www.jb.man.ac.uk/~pjh/

My opinions are not necessarily those of NRAL or the University of Manchester.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-11-23  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3470F85B.20B4@snipak.netik>
1997-11-17  5:00 ` Need line counting program for Alpha OpenVMS fairfield
1997-11-18  5:00   ` Peter Prymmer
1997-11-18  5:00 ` Petri Backstrom
1997-11-23  5:00 ` Phillip Helbig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox