jBase : OPENSEQ file access...

236 views
Skip to first unread message

PortyMan

unread,
Jul 13, 2005, 11:09:23 AM7/13/05
to jB...@googlegroups.com
Hi Guys,

Posted this on comp.databases.pick, with no response... So, thought I'd
see if I have any better luck here!

I have a program that processes a couple of large (1/2 million lines)
flat files. The actual 'files' reside on a seperate machine.

I can access the file via an MD Q pointer to LIST at JCL, or with OPEN
in DataBasic) and 'read' the item (which takes an age!).

Being a smart....guy, I thought it made more sense to OPENSEQ then
READSEQ thus saving the laborious read into memory of a huge file that
I only need to process 1 line at a time...

Only I can't 'OPENSEQ' the file... I'm just not sure what the correct
syntax for a remote file within jBase should be?

The Qpointer is 1=Q; 2=machine; 3=/directory

The Rpointer (in SYSTEM) is 1=R; 2=machine jRFS_machine; 3=null;
4=machine

where machine is the name of the machine the actual directory resides
in...

I've tried

OPENSEQ "qpointername", "filename" TO ...

and

OPENSEQ "machine:/directory","filename" TO ...

and various variations but with no joy...

Any help greatfully received.

Since then, I've had a copy of the original files placed on the same
machine and I still can't get the OPENSEQ to work?!?!

Very frustrating... there has to be a simple answer?

Robert Cowen

unread,
Jul 13, 2005, 11:53:06 AM7/13/05
to jB...@googlegroups.com, Devsup
Best place for resolving issues is dev...@jbase.com

Regards

Robert

FFT...@aol.com

unread,
Jul 13, 2005, 12:42:14 PM7/13/05
to jB...@googlegroups.com, dev...@jbase.com
In a message dated 7/13/2005 9:06:28 AM Pacific Daylight Time, rob...@jbase.com writes:


Best place for resolving issues is dev...@jbase.com
Regards
Robert


You work for jbase "rob...@jbase.com" ? but you're not willing that the answer to the question should go into the public forum? but instead as a private email?  Or did I misunderstand you?
   My question-mark quote is used up.
Will Johnson

T.Turkington

unread,
Jul 13, 2005, 12:47:34 PM7/13/05
to jB...@googlegroups.com
Yes, but sometimes the tech list is faster...; you don't indicate how you
"LIST" the file at JCL, but I suspect it is something like LIST QPOINTER
'FILENAME' (?). I suspect JRFS doesn't know how to open(seq) an item in a
folder as a file. You might try "QSELECT QPOINTER 'FILENAME'" and then
READNEXT each line..., but I'm not sure this would be any faster...

Tom

Greg Cooper

unread,
Jul 13, 2005, 1:02:12 PM7/13/05
to jB...@googlegroups.com
I haven't had the need to use OPENSEQ myself, so forgive me if what I write doesn't make sense, but here goes anyway .....
 
AFAIK OPENSEQ is used to open an operating system file rather than a database files. It looks like you are trying to use OPENSEQ for the latter and that will just never work. Anything that connects via remote Q pointers and jRFS always handle database files. I know you can theoretically open a remote flat file using a remote Q pointer and jRFS, but you can't use OPENSEQ on this.
 
One solution (and I'm sure there are others just waiting to be mailed to the group) is to mount the remote file using NFS or Samba. One you've done this, you can then OPENSEQ the file as if it were a local flat file and then hopefully NFS or Samba should take care of all the differences between local flat files and remote flat files.
 
You say you've made a copy of the files on your local machine ... well, OPENSEQ should work so long as you specify the full path name, for example
 
   OPENSEQ "/home/greg/flatfiles/bigflatfile" TO filevar ELSE PRINT "Error !!" ; STOP
 
Greg

PortyMan <garyf...@hotmail.com> wrote:

Gary Calvin

unread,
Jul 13, 2005, 1:16:01 PM7/13/05
to jB...@googlegroups.com
If you're READing the text file via jRFS, then you must be OPENing the
directory that the file is in. With OPENSEQ, you have to OPENSEQ the
file (item) itself, not the directory. So the short answer is that you
can't use jRFS to OPENSEQ a file. You need to use another network
mechanism to access the file, such as XFS or CIFS/SMB (Samba).

Presuming you have the proper network mechanism working, you need to
find the actual path to the file on the remote machine. Your Q-pointer
MD record will look like this:

001 Q
002 <local_R-pointer_name>
003 <directoryname>

Then the SYSTEM record called <local_R-pointer_name> looks like this:

001 R
002 <remote_account_name>
003
004 <remote_host_name>

The missing link is the actual file path to <remote_account_name>. You
would have to get that from the SYSTEM file on the remote machine.
Let's say that path is:

/var/jbase/account_name

...and that /var/jbase is shared as JBASE via Samba or as jbase via
xfs. Then your OPENSEQ statement might look something like:

OPENSEQ '//remote_host_name/JBASE/account_name/directoryname/itemname' ELSE ...

...or maybe...

OPENSEQ 'remote_host_name:jbase/account_name/directoryname/itemname' ELSE ...

The share might already be mounted as a drive letter (Windows) or
mount point, so it might be more like...

OPENSEQ 'N:\account_name\directoryname\itemname' ELSE ...

...or...

OPENSEQ '/mountpoint/account_name/directoryname/itemname' ELSE ...

I hope that makes sense.

-Gary-

Gary Calvin

unread,
Jul 13, 2005, 1:20:48 PM7/13/05
to jB...@googlegroups.com
>
> OPENSEQ '//remote_host_name/JBASE/account_name/directoryname/itemname' ELSE ...

Oops... forget that. That won't work. Although

OPENSEQ '\\remote_host_name\JBASE\account_name\directoryname\itemname' ELSE ...

...might work on Windows. Likewise...
>
> OPENSEQ 'remote_host_name:jbase/account_name/directoryname/itemname' ELSE ...
>
...that won't work either. You would need to mount the share at the OS
level, and then use the mountpoint syntax I mentioned in my previous
message. Sorry if I confused things.

-Gary-

Danny Ruckel

unread,
Jul 13, 2005, 2:52:02 PM7/13/05
to jB...@googlegroups.com, Devsup
What would be the purpose of this forum then? Exchanging recipes... or
perhaps Idle chit chat (sorry Jim...)

Danny



-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of Robert Cowen
Sent: Wednesday, July 13, 2005 10:53 AM
To: jB...@googlegroups.com
Cc: Devsup
Subject: RE: jBase : OPENSEQ file access...


Best place for resolving issues is dev...@jbase.com

Regards

Robert

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com]On Behalf Of
PortyMan
Sent: Wednesday, July 13, 2005 16:09
To: jB...@googlegroups.com
Subject: jBase : OPENSEQ file access...

Hi Guys,

I've tried

and

Any help greatfully received.

Notice: This transmission is for the sole use of the intended recipient(s) and may contain information that is confidential and/or privileged. If you are not the intended recipient, please delete this transmission and any attachments and notify the sender by return email immediately. Any unauthorized review, use, disclosure or distribution is prohibited.



Jim Idle

unread,
Jul 13, 2005, 3:45:44 PM7/13/05
to jB...@googlegroups.com

Robert is a salesman – just trying to help out I think. Why the stupid conspiracy theory that he would somehow have the power to prevent thing s going in the public domain? It’s not like I was born in Beeston, Leeds or anything… err, oh yes, I was!

 

Perhaps you could have answered the question instead of beating up on others.

 

OPENSEQ takes a filespec directly:

 

OPENSEQ “C:/fred/myfile.xyz

 

You don’t need all that Q pointer stuff on jBASE.

 

Jim

 


From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf Of FFT...@aol.com
Sent: Wednesday, July 13, 2005 9:42 AM
To: jB...@googlegroups.com
Cc: dev...@jbase.com
Subject: Re: jBase : OPENSEQ file access...

 

In a message dated 7/13/2005 9:06:28 AM Pacific Daylight Time, rob...@jbase.com writes:



Best place for resolving issues is dev...@jbase.com
Regards
Robert

Jim Idle

unread,
Jul 13, 2005, 3:48:11 PM7/13/05
to jB...@googlegroups.com, Devsup


> -----Original Message-----
> From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of
> Danny Ruckel
>
>
> What would be the purpose of this forum then? Exchanging recipes...
or
> perhaps Idle chit chat (sorry Jim...)

Avoiding paying for support, then complain that all the Temporal Wave
stuff is not free too? ;-)

>
> Danny

FFT...@aol.com

unread,
Jul 13, 2005, 9:12:10 PM7/13/05
to jB...@googlegroups.com
In a message dated 7/13/05 12:46:26 PM Pacific Daylight Time,
ji...@temporal-wave.com writes:

<< Perhaps you could have answered the question instead of beating up on
others. >>

I would if I had *known* it. That's a bit of a requisite isn't it?
Will

Jim Holloway

unread,
Jul 14, 2005, 1:57:48 AM7/14/05
to jB...@googlegroups.com
You might start with your support channel; jbase is a commercial
product, as much as some people here like answering ancillary support
questions, that's still your first line for support questions.

Take care and thanks for being such a jack ass.

-Jim

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of FFT...@aol.com
Sent: Wednesday, July 13, 2005 6:12 PM
To: jB...@googlegroups.com
Subject: Re: jBase : OPENSEQ file access...


Jim Holloway

unread,
Jul 14, 2005, 2:06:32 AM7/14/05
to jB...@googlegroups.com
Sorry, MS spell checker added a space, I obviously meant "jackass" (for
the pedantic ;-)

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of Jim Holloway
Sent: Wednesday, July 13, 2005 10:58 PM
To: jB...@googlegroups.com
Subject: RE: jBase : OPENSEQ file access...


PortyMan

unread,
Jul 14, 2005, 6:33:27 AM7/14/05
to jB...@googlegroups.com
Well... Thanks for all the feedback!

Robert, I think we may have 'spoken' (ie emailed) via another channel -
I'm away from home at the moment so can't check... Something to do with
me trying to install jBase at home...

I'd forgotten about the dev support email thingie... I did try the
jBase international site and found nothing about OPENSEQ in the
Knowledge base, and nothing about accessing remote files, etc. That's
why I came here! (As the man said, what's the point of this forum if
not to answer 'techie' queries? Just philosophical discussions on the
potential of Pick? Anyway, I've learned my lesson - bug the guys who
get paid to answer dumb questions first!! :-)

Anyway. Looks like it can't be done. Which is a shame, it would've been
nice to improve the performance of the routine. But, hey,it works -
albeit with a large pause while it reads a monster item into memory,
twice - so, I'm 'happy'.

I may try again I find an idle moment...

Oh, and apologies to Jim H for being such a Jackass/Jack Ass - I only
asked...(pout).

FFT...@aol.com

unread,
Jul 14, 2005, 12:47:20 PM7/14/05
to jB...@googlegroups.com
In a message dated 7/13/2005 10:57:57 PM Pacific Daylight Time, Ji...@gtsservices.com writes:


You might start with your support channel; jbase is a commercial
product, as much as some people here like answering ancillary support
questions, that's still your first line for support questions.

Take care and thanks for being such a jack ass.


Right back at ya you piece of crap.
How dare you flame me in public for merely pointing out that a
Question on google groups should be answered there
not in some private, invisible manner by the hand of god.

Your kind disgust me.
Have a nice day and fuck off.
Kthnxbye
Will Johnson

FFT...@aol.com

unread,
Jul 14, 2005, 12:54:51 PM7/14/05
to jB...@googlegroups.com
In a message dated 7/13/2005 10:57:57 PM Pacific Daylight Time, Ji...@gtsservices.com writes:


You might start with your support channel; jbase is a commercial
product, as much as some people here like answering ancillary support
questions, that's still your first line for support questions.

Take care and thanks for being such a jack ass.

-Jim

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of FFT...@aol.com
Sent: Wednesday, July 13, 2005 6:12 PM
To: jB...@googlegroups.com
Subject: Re: jBase : OPENSEQ file access...


In a message dated 7/13/05 12:46:26 PM Pacific Daylight Time,
ji...@temporal-wave.com writes:

<< Perhaps you could have answered the question instead of beating up on
others. >>

I would if I had *known* it.  That's a bit of a requisite isn't it?
Will


Sorry I should have posted the ENTIRE portion so people were clear that Jim was responding to *me* in his high-handed, I'm-a-god-and-can-say-anything-i-want, manner which so turns me off.

Will Johnson

Jim Idle

unread,
Jul 14, 2005, 1:10:41 PM7/14/05
to jB...@googlegroups.com


> -----Original Message-----
> From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of
> FFT...@aol.com
> Sent: Wednesday, July 13, 2005 6:12 PM
> To: jB...@googlegroups.com
> Subject: Re: jBase : OPENSEQ file access...
>
>
> In a message dated 7/13/05 12:46:26 PM Pacific Daylight Time,
> ji...@temporal-wave.com writes:
>
> << Perhaps you could have answered the question instead of beating up
on
> others. >>
>
> I would if I had *known* it. That's a bit of a requisite isn't it?
> Will

Well you didn't 'know' who Robert was or 'know' that he was trying to
suppress information did you? By your own argument...

That's enough petty stupidity for one list...

Jim

Clif Bristol

unread,
Jul 14, 2005, 1:32:43 PM7/14/05
to jB...@googlegroups.com
Would you two take this off line

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com]On Behalf Of
Jim Idle
Sent: Thursday, July 14, 2005 10:11 AM
To: jB...@googlegroups.com
Subject: RE: jBase : OPENSEQ file access...





Jim Idle

unread,
Jul 14, 2005, 1:41:46 PM7/14/05
to jB...@googlegroups.com


> -----Original Message-----
> From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
Of
> PortyMan


Anyway, I've learned my lesson - bug the guys who
> get paid to answer dumb questions first!! :-)

No - you don't have to do this. But, if you have a support channel you
should use it of course. Before I left jBASE I was debating the idea of
an open support forum, with some private boards for commercially
sensitive issues (VARS cannot post their source code to the world of
course). SO the support guys would have basically merged Devsup with the
group. However, I left before that could be thought through properly.

>
> Anyway. Looks like it can't be done. Which is a shame, it would've
been
> nice to improve the performance of the routine. But, hey,it works -
> albeit with a large pause while it reads a monster item into memory,
> twice - so, I'm 'happy'.

It can be done - it just needs a slightly different approach. If the
remote system is UNIX, install SAMBA, if Windows then share the
directory and open as a share (no need to mount it).

I am sure that the Devsup gusy will guide you through this! ;-)

>
> I may try again I find an idle moment...
>
> Oh, and apologies to Jim H for being such a Jackass/Jack Ass - I only
> asked...(pout).


This wasn't directed at you I think ;-)

Jim

PortyMan

unread,
Jul 15, 2005, 5:58:29 AM7/15/05
to jB...@googlegroups.com
Hi Guys...

Me again. Just to say

1) Sorry for having caused/incited/facilitated a flare-up of some sorts
between members. Obviously not my intention. Just an old guy trying to
make a living!

2) I suddenly remembered (that happens at my age...) that I was
directed to this 'group' directly from the jBase international site
from the bit right next to...

"Send support requests and bug reports to dev...@jbase.com."

which I obviously missed! (Actually, I did think my questions was kinda
trivial... turns out it's not really).

3) I am in dialogue with devsup (very nice people, I recommend them
thoroughly). Hopefully something will come of this. But as this issue
is a bit of a one-off (and I'm on a short-contract) I'm reluctant to
start 'installing' anything or even just rocking the boat re: file
setups etc...

Anyway, thanks for all your comments. I hope some steam's been released
and we can all get back to the important stuff (like the Golf, my
holiday next week and who killed Fenner? - I don't actually care who
killed Fenner, just trying to be topical and 'hip')

Peace and Love, maaaan...

T.Turkington

unread,
Jul 15, 2005, 11:12:05 AM7/15/05
to jB...@googlegroups.com
I'm curious if a READV requires bringing the entire item through the JRFS
pipe, or if the service has enough sense to just send over the line
requested; i.e. use READV ...,LINE.NBR instead of READSEQ(?). Obviously
this method would require knowing how many lines are in the flat file or
otherwise knowing that the item had come to an end of file/item.

Tom

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com]On Behalf Of
PortyMan
Sent: Friday, July 15, 2005 2:58 AM
To: jB...@googlegroups.com
Subject: Re: jBase : OPENSEQ file access...



Gary Calvin

unread,
Jul 15, 2005, 11:18:05 AM7/15/05
to jB...@googlegroups.com
No, READV over jRFS reads the whole item, then parses out the
Attribute, Value, or SubValue requested.

-Gary-

FFT...@aol.com

unread,
Jul 15, 2005, 5:27:50 PM7/15/05
to jB...@googlegroups.com
In a message dated 7/14/05 10:11:00 AM Pacific Daylight Time,
ji...@temporal-wave.com writes:

<< > I would if I had *known* it. That's a bit of a requisite isn't it?
> Will

Well you didn't 'know' who Robert was or 'know' that he was trying to
suppress information did you? By your own argument...

That's enough petty stupidity for one list...

Jim >>

I *knew* that someone was suggesting hijacking a thread.
Talking about petty and stupid you need to be looking in a mirror.
Get off my back.
Will Johnson

PortyMan

unread,
Jul 15, 2005, 7:55:56 PM7/15/05
to jB...@googlegroups.com
Hi Tom (and Gary),
Re: the READV thing... I tried that. It just took as long to read the
'first' item... Which is what Gary (the other one) is saying, I guess?

Gary

Gary Calvin

unread,
Jul 16, 2005, 2:02:03 PM7/16/05
to jB...@googlegroups.com
Do you have authority over the remote system, where the text file
resides? You might consider having that system parse the text file
into a hashed file upon receipt, which would make it friendlier to
jRFS.

-Gary-
Reply all
Reply to author
Forward
0 new messages