[T24] Selecting Data from two different files

632 views
Skip to first unread message

felix

unread,
May 13, 2008, 11:00:24 AM5/13/08
to jBASE
Hi,



Is it possible to retrieve data from two file using select clause in
jBase?

Example is like selecting LD numbers and the names for the customer
who owners the loan.

I am using:

OS Release : Red Hat Enterprise Linux AS release 4 (Nahant)
jBase RELEASE : Major 4.1.5.8 [R05]


Regards,



Felix

Luis Lascano

unread,
May 13, 2008, 11:56:12 AM5/13/08
to jB...@googlegroups.com, T24G...@googlegroups.com
Félix,

Yes, what you have to do is to create an I_descriptor on SS for LD which
points to CUSTOMER table.

Luis

Jim Idle

unread,
May 13, 2008, 12:03:26 PM5/13/08
to jB...@googlegroups.com
You will need to create a dictionary entry that uses a T correlative, or contains an I-Type, then you can use the item ID or some element of the item in the first file, to retrieve the data from the item in the second file (kind of like a JOIN in a way.) Be careful though because this does start to get expensive. in 4.1 a T correlative will cache the conversion key/data pairs in certain situations, though this is generally only useful for things like taking the number 7 and translating it to "July". You probably want an I-Type or a call to a BASIC subroutine.

Jim

> -----Original Message-----
> From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf
> Of felix
> Sent: Tuesday, May 13, 2008 8:00 AM
> To: jBASE
> Subject: [T24] Selecting Data from two different files
>
>

Ashok Pandey

unread,
May 13, 2008, 12:13:46 PM5/13/08
to jB...@googlegroups.com
you may use concat faile LMM.CUSTOMER
 

R8 MODEL BANK

LMM.CUSTOMER - Default List

ID CONTRACT.NO FUNCT.

-----------------------------------------------------------

1 100200 LD0733900012

2 100224 LD0733900052

3 100225 LD0733900051

4 100273 MM0733900056



--
Cheers
Ashok Pandey
14 Liberty Corner
James Joyce Street,
Dublin-1, Ireland

BENIMANA Robert

unread,
May 13, 2008, 8:16:39 PM5/13/08
to jB...@googlegroups.com
dear Felix
I think for you to use a select statement for 2 files
I can advise you to do this
Just build a routine and select from the first file what you want to select save the list and after
use the loop  to select in the other  file using the saved list.
Hope it will help you
BENI

John Watson

unread,
May 14, 2008, 5:09:57 AM5/14/08
to jBASE
All the advice given about I types and T correlatives is correct but
you must remember that T24 allows Multi Company and that CUSTOMER data
*could* be held in any of your companies.

For this reason you need to add an Item to the STANDARD.SELECTION that
is a (J)oin type, this works as follows;

SYS.FIELD.NAME. CUST.NAME
SYS.TYPE....... J
SYS.FIELD.NO CUSTOMER.ID>CUSTOMER>SHORT.NAME

This works out as - take the CUSTOMER.ID in the LD contract and
Translate this to the appropriate CUSTOMER table and return the
SHORT.NAME (or NAME.1 or whatever you like)

If you use an I type or a (T)ranslate then you need to hard code the
file name and this may not always be correct - using a (J)oin will
allow T24 to calculate the correct underlying file.

This is also the reason that OPF and F.READ should be used in T24 -
these utilities know which companies data you are dealing and use the
correct files.

Luis Lascano

unread,
May 14, 2008, 11:12:05 AM5/14/08
to jB...@googlegroups.com
This is becoming a T24 issue so I have amended subject...

Yes, j-type works fine but inside T24 only. If you login and stay on j-Base
without going first to T24/Globus then listing LD table and specifying
j-field will give an OPF error.

On the other side, logging in and out of T24 and going back to j-Base will
initialize common and other global variables that will allow j-descriptors
to work.

How could we fix this? Doing the same as EX does, i.e. initializing Global
Variables?

Luis

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

Reply all
Reply to author
Forward
0 new messages