HP3000-L Archives

June 1995, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Fri, 16 Jun 1995 15:39:33 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
On Jun 16,  4:21pm, Jon Diercks wrote:
> Subject: Re: :LISTF,locks (format 9) DRAFT  [long]
 
I wrote:
> >You could also use pos('label_name',output_line) to find the value you are
> >parsing for.  Eg.  pos('ACC:',lf_outbuf)+2 gets you to the access type
value.
>
Jon wrote:
> Safer, perhaps, but probably slower than LTRIMming and using absolute
> parsing offsets.
 
I did some performace testing:
A loop doing 3000 iterations of extracting the process's access (read, write,
etc) from a variable holding the entire PIN line was coded two ways:
 1) setvar x str(ltrim(lf_outbuf),15,15)  where lf_outbuf is the entire line
                                          and the start is an absolute col #
 2) setvar x str(foo,pos('ACC:',lf_outbuf)+6,15) where the start is computed
                                          from the position of the "ACC:" label
 
1) took approx 5.2 secs.  2) took approx 5.6 secs.  I wouldn't let this
performance difference cause me to hard-code columns offsets (although I did
hard-code field widths)
 
Jon wrote:
> Ok, based on those two statements I think I understand the intent better and
> it changes my thinking on what I would recommend.  The way it is now, the
> *only* time display begins in column 1 is when the CWD is the logon group
> and traditional MPE filenames are being listed.
 
Yes, but this is how all scripts/programs expect to see the output since
release 1.0 (and earlier).  It is only with the introduction of HFS filenames
that we have a difference, and existing scripts that wish to work with HFS
names
will need to be changed.
 
> I can think of no scenario
> in which that particular distinction is important, so I suggest that *all*
> information should begin in column 2, regardless of whether the filename is
> likely to wrap.
 
We can't change the output of LISTF on MPE filenames for compatibility
reasons.  (:listf of MPE names when the CWD <> logon group does use the new HFS
output formats, again meaning that scripts that need to work in this situation
will need to be modified.)
 
Jeff Vance
 
--

ATOM RSS1 RSS2