HP3000-L Archives

October 2001, Week 4

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:
Donna Garverick <[log in to unmask]>
Reply To:
Donna Garverick <[log in to unmask]>
Date:
Tue, 23 Oct 2001 10:39:05 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
hi all!

i've got a little puzzler and i thought i'd let more/bigger
(:-) minds than just mine ponder a solution.

i've got a simple little text file with two pieces of
information on each record.  the first 'word' (piece of
information) could be considered as a key value.  that is --
another process will be examining this file looking for a
match on the first field.  (and btw, since i know the
data....most of the time the match will fail....).  if a
match is found, i need the 2nd 'word' (piece of information)
placed into a ci variable.  sound rather simple....except
that last piece -- getting the information from the file
into a variable.

i've considered a number of solutions -- that all result in
some how echoing the matched data record to a (one record)
disc file and doing a 'input blah < disc'.  (qedit and grep
and similar are all going boil down to this sort of
solution, imo)  it's the amount of disc i/o that's got me
'grumpy'.  otoh....maybe all this disc i/o is really the
'cheapest' solution and i'm just unenlightened.

i had one idea proposed -- since the 1st word in this little
file is numeric -- align the data onto the correct record by
number (that is, if the 1st word's value is '50', make it
the 50th record...and so on...and 'holes' would just be
blank records) then do something like a directed read (using
the 'start' and 'end' options from the print command (of
course, this still would taking the 'input blah < disc'
route)).  what concerns me, is the 'relationship' between
the data and the record number is really arbitrary -- not
well coupled (like it might be with a ksam file or a
database -- and neither of these are really solutions since
everything is being scripted).

so...hoping that i've described this well...does anyone else
have any other suggestions?        - d

--
Donna Garverick     Sr. System Programmer
925-210-6631        [log in to unmask]

>>>MY opinions, not Longs Drug Stores'<<<

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

ATOM RSS1 RSS2