HP3000-L Archives

February 1997, Week 2

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:
Ted Ashton <[log in to unmask]>
Reply To:
Ted Ashton <[log in to unmask]>
Date:
Mon, 10 Feb 1997 15:13:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
Thus it was written in the epistle of Jeff Kell,
>
> Rakesh Saha wrote:
> >
> > Is there a perl interface available for IMAGE/SQL ?
>
> Not yet, but with perl5.003 it should be possible to create some sort of
> IMAGE.pm that dynamically links the IMAGE intrinsics.  They don't need
> the "option variable" or "option extensible" quirks so should be fairly
> straightforward.  Missing link is a cross-trained MPE/Unix/perl
> volunteer to make it happen.
>
> Jeff Kell <[log in to unmask]>
>

Have been dreaming/contemplating this for a while and (*no promises*) am hoping
to be able to scratch some time together for it this summer.  Would be
interested in what sort of interface one would expect (more on this in a
moment) and advice on fast serial reading of datasets--I'm afraid that there
will be a good bit of that.  Actually, B-Trees, if and when they arrive ought
to make life considerably simpler for this project.

About the interface, I've been contemplating using the tie mechanism (hashes)
something along these lines:

Assuming that BAR.DATABASE.SYS has a dataset FOOSET in it with the following
  items:
     ID    J2
     NAME  X32

where one record is ID=12345, NAME="John W. Smith" and another is ID=44251,
NAME="Mary Foster".

tie (%foo, Image_DSet, 'FOOSET', 'BAR.DATABASE.SYS', 5);
print $foo{'ID'}->{12345}->{'NAME'},"\n";
print $foo{'ID'}->{44251}->{'NAME'},"\n";
foreach (reverse sort keys %{$foo{'NAME'}}) {
  print "$_\n";
}
print $foo{'NAME'}->{'John W. Smith'}->{'ID'},"\n";

would produce:

John W. Smith
Mary Foster
Mary Foster
John W. Smith
12345

It isn't perfect by any means, but it is the best way I've thought of.  I'd be
interested in advice, suggestions, etc.  Also, if anyone else wants to create
this or team up on it, I'd be interested.

Ted
--
Ted Ashton ([log in to unmask]) | From the Tom Swifty collection:
Southern Adventist University    | "This brush isn't helping my hair one bit",
Collegedale, TN  37315           | Tom snarled.
(423) 238-2703                   |

ATOM RSS1 RSS2