dbTalk Databases Forums  

Attribute Descriptor

comp.databases.pick comp.databases.pick


Discuss Attribute Descriptor in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Specific
 
Posts: n/a

Default Attribute Descriptor - 08-17-2010 , 03:40 PM






Figured I would ask here first since it would probably take forever to
find in the documentation.

When I run :ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.

Reply With Quote
  #2  
Old   
Brian Speirs
 
Posts: n/a

Default Re: Attribute Descriptor - 08-17-2010 , 03:51 PM






The T4,2 is a text extraction operating (in this case) on attribute 0
(the item-id) specified in line 2 of the dictionary. The extraction will
return 2 characters starting at position 4 (ie characters 4 and 5) of
the item-id. So, if the id is ABCDEFG, then this will return DE.

Likewise, the G*1 is a group extraction (which is more fully written
as G0*1). This syntax means return 1 group delimited by an '*'
character, after skipping the first 0 groups. So, if the id is
ABC*123*XYZ, then this will return ABC.

HTH,

Brian

On 17/08/2010 21:40, Specific wrote:
Quote:
Figured I would ask here first since it would probably take forever to
find in the documentation.

When I run :ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.

Reply With Quote
  #3  
Old   
Specific
 
Posts: n/a

Default Re: Attribute Descriptor - 08-17-2010 , 03:59 PM



On Aug 17, 2:51*pm, Brian Speirs <bs... (AT) btinternet (DOT) com> wrote:
Quote:
* *The T4,2 is a text extraction operating (in this case) on attribute 0
(the item-id) specified in line 2 of the dictionary. The extraction will
return 2 characters starting at position 4 (ie characters 4 and 5) of
the item-id. So, if the id is ABCDEFG, then this will return DE.

* *Likewise, the G*1 is a group extraction (which is more fully written
as G0*1). This syntax means return 1 group delimited by an '*'
character, after skipping the first 0 groups. So, if the id is
ABC*123*XYZ, then this will return ABC.

HTH,

Brian

On 17/08/2010 21:40, Specific wrote:

Figured I would ask here first since it would probably take forever to
find in the documentation.
Thanks for the quick response =). I just found processing.codes in
d3ref, hopefully I can learn a lot from that.

Thanks


Quote:
When I run *:ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.


Reply With Quote
  #4  
Old   
Specific
 
Posts: n/a

Default Re: Attribute Descriptor - 08-17-2010 , 04:32 PM



On Aug 17, 2:51*pm, Brian Speirs <bs... (AT) btinternet (DOT) com> wrote:
Quote:
* *The T4,2 is a text extraction operating (in this case) on attribute 0
(the item-id) specified in line 2 of the dictionary. The extraction will
return 2 characters starting at position 4 (ie characters 4 and 5) of
the item-id. So, if the id is ABCDEFG, then this will return DE.

* *Likewise, the G*1 is a group extraction (which is more fully written
as G0*1). This syntax means return 1 group delimited by an '*'
character, after skipping the first 0 groups. So, if the id is
ABC*123*XYZ, then this will return ABC.

HTH,

Brian

On 17/08/2010 21:40, Specific wrote:

Figured I would ask here first since it would probably take forever to
find in the documentation.

When I run *:ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.


How about this one
F;0;C*1;:;(TSLA,CUSTOMERS,;X;0;0)

I believe it is reading from the item.id of customers file in sla
account?

Reply With Quote
  #5  
Old   
Ross Ferris
 
Posts: n/a

Default Re: Attribute Descriptor - 08-17-2010 , 08:52 PM



On Aug 18, 7:32*am, Specific <domp... (AT) gmail (DOT) com> wrote:
Quote:
On Aug 17, 2:51*pm, Brian Speirs <bs... (AT) btinternet (DOT) com> wrote:





* *The T4,2 is a text extraction operating (in this case) on attribute 0
(the item-id) specified in line 2 of the dictionary. The extraction will
return 2 characters starting at position 4 (ie characters 4 and 5) of
the item-id. So, if the id is ABCDEFG, then this will return DE.

* *Likewise, the G*1 is a group extraction (which is more fully written
as G0*1). This syntax means return 1 group delimited by an '*'
character, after skipping the first 0 groups. So, if the id is
ABC*123*XYZ, then this will return ABC.

HTH,

Brian

On 17/08/2010 21:40, Specific wrote:

Figured I would ask here first since it would probably take forever to
find in the documentation.

When I run *:ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.

How about this one
F;0;C*1;:;(TSLA,CUSTOMERS,;X;0;0)

I believe it is reading from the item.id of customers file in sla
account?- Hide quoted text -

- Show quoted text -
You are correct - that is what ;(TSLA,CUSTOMERS,;X;0;0)
does, but it is first getting ID (attribute 0 --> the "first bit"
after the "F") of the current file file, and appending (the ";") a
"*1" (C*1 defines a constant ... and the following ":" is the
concatenation operator)

F correlatives use reverse polish notation which can make them "fun" --
Quote:
as you appear to be using D3, consider replacing these "cryptic"
codes with CALLs to basic subroutines for ease of maintenance (though
I believe in most instances, whist "hard to read", the native F-
correlative is going to be faster

Reply With Quote
  #6  
Old   
Specific
 
Posts: n/a

Default Re: Attribute Descriptor - 08-25-2010 , 12:52 PM



On Aug 17, 7:52*pm, Ross Ferris <ro... (AT) stamina (DOT) com.au> wrote:
Quote:
On Aug 18, 7:32*am, Specific <domp... (AT) gmail (DOT) com> wrote:



On Aug 17, 2:51*pm, Brian Speirs <bs... (AT) btinternet (DOT) com> wrote:

* *The T4,2 is a text extraction operating (in this case) on attribute 0
(the item-id) specified in line 2 of the dictionary. The extraction will
return 2 characters starting at position 4 (ie characters 4 and 5) of
the item-id. So, if the id is ABCDEFG, then this will return DE.

* *Likewise, the G*1 is a group extraction (which is more fully written
as G0*1). This syntax means return 1 group delimited by an '*'
character, after skipping the first 0 groups. So, if the id is
ABC*123*XYZ, then this will return ABC.

HTH,

Brian

On 17/08/2010 21:40, Specific wrote:

Figured I would ask here first since it would probably take foreverto
find in the documentation.

When I run *:ct dict file ns
001 A
002 0
008 T4,2
009 L
010 2

My question is on line 008, where does this point to? One attribute
has on line 008 G*1

Any help would be appreciated.

How about this one
F;0;C*1;:;(TSLA,CUSTOMERS,;X;0;0)

I believe it is reading from the item.id of customers file in sla
account?- Hide quoted text -

- Show quoted text -

You are correct - that is what ;(TSLA,CUSTOMERS,;X;0;0)
does, but it is first getting ID (attribute 0 --> the "first bit"
after the "F") of the current file file, and appending (the ";") a
"*1" (C*1 defines a constant ... and the following ":" is the
concatenation operator)

F correlatives use reverse polish notation which can make them "fun" --> as you appear to be using D3, consider replacing these "cryptic"

codes with CALLs to basic subroutines for ease of maintenance (though
I believe in most instances, whist "hard to read", the native F-
correlative is going to be faster
Thanks Ross for all your help. I'm doing my best to learn these
correlatives and they can get very confusing when you don't know them
lol

What i've got from this is that A-correlative is like 2*2, while F is
like an adding machine 2,2,*.
C defines a constant, so the C*1 would be like using F;0;"*1";:;
which would come out to "CustID*1" concatenated by using :
Everything before the T file translation would be the source data used
as record id.

Hope I got that all right =)

In this line F;0;C*1;:;(TSLA,CUSTOMERS,;X;0;0)
Does () terminate the f-correlative? I've also seen A;
0:"*1"]TSLA,CUSTOMERS,;X;1;1
only documentation I could find on ] is "Replaces the top two items on
the stack by 1 if the top item is greater than or equal to the second
item, otherwise 0."

Reply With Quote
  #7  
Old   
Brian Speirs
 
Posts: n/a

Default Re: Attribute Descriptor - 08-25-2010 , 02:57 PM



Correlatives can be horribly obscure at times ...

See comments below:

Quote:
What i've got from this is that A-correlative is like 2*2, while F is
like an adding machine 2,2,*.
C defines a constant, so the C*1 would be like using F;0;"*1";:;
which would come out to "CustID*1" concatenated by using :
Everything before the T file translation would be the source data used
as record id.

Hope I got that all right =)

In this line F;0;C*1;:;(TSLA,CUSTOMERS,;X;0;0)
Does () terminate the f-correlative?
I think I'd phrase it that the parentheses cause the file translation to
be seen as a single bit of code. Otherwise, the F processor will extract
each string that is delimited by the semi-colons - which won't make
sense for processing.

I've also seen A;
Quote:
0:"*1"]TSLA,CUSTOMERS,;X;1;1
only documentation I could find on ] is "Replaces the top two items on
the stack by 1 if the top item is greater than or equal to the second
item, otherwise 0."
In this case, the ] symbol is likely to be a value mark. That is
effectively a separator between two individual statements. So what this
correlative does is:

1. Concatenates "*1" to the item-id (attribute 0)
2. Uses the value just derived as a key into the CUSTOMERS file,
returning the first attribute. The X processing code means that if the
item is not found, then return a null value.

I'm not actually familiar with the comma after the file name. That may
be a D3 specific syntax (whereas I have used these codes with mvBASE).
Likewise, the first 1 after the X probably isn't needed - something
like: TSLA,CUSTOMERS;X;;1 will probably work just as well.

Cheers,

Brian

Reply With Quote
  #8  
Old   
Frank Winans
 
Posts: n/a

Default Re: Attribute Descriptor - 08-25-2010 , 11:16 PM



"Brian Speirs" wrote
<snip>
Quote:
I've also seen A;
0:"*1"]TSLA,CUSTOMERS,;X;1;1
<snip>
Quote:
I'm not actually familiar with the comma after the file name. That may
be a D3 specific syntax (whereas I have used these codes with mvBASE).
Likewise, the first 1 after the X probably isn't needed - something
like: TSLA,CUSTOMERS;X;;1 will probably work just as well.

Cheers,

Brian
The syntax is very fussy about that trailing comma;
myacct,customers,
is understood to be the customers file in the myacct account, but
"the wheels fall off the wagon" if you omit that trailing comma;
myacct,customers
is considered to mean a file called 'myacct' in the current
account, but use an alternate data section called customers
-- ie, md myaccount is assumed to exist and be a file-defining item,
such as a qpointer or a d-pointer,
and dict myacct customers is assumed to exist and be a
d-pointer or a qpointer that provides the actual file data section.
so the clause TSLA,CUSTOMERS,;X;1;1
means same as TCUSTOMERS;X;1;1
if you are logged in to the SLA account.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.