Read DICT file and determine field numbers and titles

830 views
Skip to first unread message

ww

unread,
Sep 4, 2008, 1:07:11 PM9/4/08
to jBASE
Is there a way to find field positions in the DICT file so I can use
something along these lines:

PRINT FILE.ITEM<1>
PRINT FILE.ITEM<2>

I'm wanting to determine the position of each field so I can PRINT
only the fields I need vs all 104 fields in the DICT
and I'd like to do this in a loop vs. typing PRINT DICT.ITEM<1>, PRINT
DICT.ITEM<2> etc.

Thanks in advance.

x

unread,
Sep 4, 2008, 10:32:59 PM9/4/08
to jBASE
Obviously you are just wetting your feet in the Multi Value (little)
world.
To get the very basics I would suggest reading http://www.jes.com/pb/
To answer your question now.
Do:
LIST DICT MY-FILE BY *A1 *A1
Translation:
DICT means dictionary portion.
Each dictionary record has a bunch of fields that can be addressed as
*A1, *A2, *A3 etc. where the suffix is the field number.
*A1 in a dictionary record holds the field number in the data record -
clear as mud but see the example below.
At typical file has a data section made of records that are similar in
structure.
The structure is defined in the dictionary section.
If you want to know the meaning of a specific data field in the data
section, you look in the dictionary section for the description of the
field.
The LIST command above will show 2 columns, one with the name of the
data field and the other one with the field number.
You'll see that in some cases you have multiple descriptions for the
same field in the file but thats beyond this introduction.
Let's say you find in the dictionary an item named CUSTOMER with a
field number of 27.
Now you can see the customers in MY-FILE issuing the following
command.
LIST MY-FILE CUSTOMER
or
LIST MY-FILE *A27
The second form will show the actual data in the file which may be the
customer or may be just a link to another file etc.

Hope it helps,
Lucian

Ram shankar

unread,
Sep 5, 2008, 7:01:02 AM9/5/08
to jB...@googlegroups.com
You can use "FIELD.NAMES.TO.NUMBERS" routine where you have to pass the field name, the SS record and it returns the field's position.
 
Ram.

 

brucew...@comcast.net

unread,
Sep 5, 2008, 11:07:36 AM9/5/08
to jB...@googlegroups.com
That looks to me like it's a T24 utility, and not part of jBase. Lucian's advice was probably best, IMHO, because Walt is obviously new to the Multi-Value world, and as such, should really get acquainted with the basics first.

ww

unread,
Sep 5, 2008, 12:00:31 PM9/5/08
to jBASE
Folks I really appreciate you assistance. I am completely new to jBase
and I'm reading everything I can find so thanks for the links and the
great explanations. The LIST MY-FILE *A1 *A2 was a great help. The
DICT file I'm working with has 104 different fields so I just printed
as a reference so I can familiarize myself with the different field
names.

Thanks again.

Luis Lascano

unread,
Sep 5, 2008, 1:39:22 PM9/5/08
to jB...@googlegroups.com
Lucian,

If I do:

LIST DICT MY-FILE F1 F2

Is the same as command?

LIST DICT MY-FILE BY *A1 *A1

Luis

-----Original Message-----
From: jB...@googlegroups.com [mailto:jB...@googlegroups.com] On Behalf Of x
Sent: Thursday, 04 September, 2008 9:33 PM
To: jBASE
Subject: Re: Read DICT file and determine field numbers and titles

Jim Idle

unread,
Sep 5, 2008, 2:26:59 PM9/5/08
to jB...@googlegroups.com
On Fri, 2008-09-05 at 12:39 -0500, Luis Lascano wrote:
Lucian,

If I do:

LIST DICT MY-FILE F1 F2

Is the same as command?

LIST DICT MY-FILE BY *A1 *A1

Yes, these are effectively the same but come from different legacy systems. The *An stuff comes from Microdata's Reality and the F1 comes from Prime via UniVerse/Unidata. jBASE defaults these if there are no specific definitions in the DICT, MD/VOC, SYSTEM (I am pretty sure that that is the order, but you could check). jBASE 4.1 may not actually default the Fn syntax.

You (and perhaps others) may be interested in this newly announced course:

http://www.intl-spectrum.com/tabid/159/univ/2/default.aspx

Jim

x

unread,
Sep 5, 2008, 3:13:26 PM9/5/08
to jBASE
Luis,

In fact I made a typo, I meant:
LIST DICT MY-FILE BY *A2 *A2
In AP emulation F1, F2 etc are not recognized nor present in the MD.
I've changed the emulation to UNIVERSE and after issuing "updatemd"
command, F1, F2 etc. are still missing so Jim's statement "jBASE 4.1
may not actually default the Fn syntax." is confirmed.

Lucian
jBASE 4.1.17 on Windows XP.
Reply all
Reply to author
Forward
0 new messages