dbTalk Databases Forums  

Tutorial on I-Descriptors

comp.databases.pick comp.databases.pick


Discuss Tutorial on I-Descriptors in the comp.databases.pick forum.



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

Default Tutorial on I-Descriptors - 03-07-2006 , 02:09 PM






Hi,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

Cheers,

Brian Speirs
brian at rushflat dot co dot nz

Reply With Quote
  #2  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 02:26 PM






Goo'day, Brian.

Ray Wurlod has this:

http://home.iprimus.com.au/raywurlod...ctionaries.htm

HTH

On Wed, 08 Mar 2006 09:09:46 +1300, Brian Speirs
<bss59REMOVE_THIS (AT) paradise (DOT) net.nz> wrote:

Quote:
Hi,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

Cheers,

Brian Speirs
brian at rushflat dot co dot nz
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #3  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 02:54 PM



Goo'day, again,

I'll add to that:

1. Use OpenQM's MODIFY to create Dict items. Takes the pain out of
using ED.....

2. I used to have a swag of problems centred around I-Type TRANS's in
trying to determine the ID of the file to which I wanted to transfer.
After a few failures in the expression in <F2>, I resorted to
determining the ID and doing the translation in the first statement in
the field's expression, something along the lines of:

0001 I
0002
TRANS("CUSTOMER",OCONV(FIELD(FIELD(@ID,"*",1),"-",2),'MCN'),1,'X')
0003 .....

rather than trying to do it on a step-by-step basis. Dunno why; just
always seemd to work this way......whereas......

3. I've now learned about things like FMT EVAL CONV COL.HDG et al,
which in a lot of cases reduces a dictionary to just the one dict item
per field....

Go fer it....


On Wed, 08 Mar 2006 07:26:04 +1100, Bruce Nichol
<reverse_ecurb (AT) taloncs (DOT) com.au> wrote:

Quote:
Goo'day, Brian.

Ray Wurlod has this:

http://home.iprimus.com.au/raywurlod...ctionaries.htm

HTH

On Wed, 08 Mar 2006 09:09:46 +1300, Brian Speirs
bss59REMOVE_THIS (AT) paradise (DOT) net.nz> wrote:

Hi,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

Cheers,

Brian Speirs
brian at rushflat dot co dot nz
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #4  
Old   
Tom deL
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 03:02 PM



Hi Brian,

Quote:
Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.
When I started with openQM (from R83/AP/D3 background) I found Martin's
docs quite helpful. While not a big tutorial on this subject, the
'Intro' document is often overlooked as a source of detailed
information:
http://www.openqm.com/downloads/intro.pdf

I think that the name lead me to think that it was a superficial
overview when in fact it answers a _lot_ of questions.

Hope this helps,
-Tom

P.S. Another thing that might be generally helpful to someone coming
from PICK would be spending a little time following the tutorial
contained in:
http://www.openqm.com/downloads/tutorial.pdf



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

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 05:46 PM



Hi Bruce,

Yes, I'd found that by doing a Google search.

I guess I'm really looking for more examples of what goes on line 2 of
the I descriptor, in standard and unusual cases. Something like:

Basic lookups
Complicated lookups
Manipulation to get ID of lookup file
Lookup from file A to file B to file C
How to call BASIC subroutines
Any special format of the subroutine?

I'll get there!

Cheers,

Brian

Bruce Nichol wrote:
Quote:
Goo'day, Brian.

Ray Wurlod has this:

http://home.iprimus.com.au/raywurlod...ctionaries.htm

HTH

On Wed, 08 Mar 2006 09:09:46 +1300, Brian Speirs
bss59REMOVE_THIS (AT) paradise (DOT) net.nz> wrote:

Hi,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

Cheers,

Brian Speirs
brian at rushflat dot co dot nz
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....

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

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 05:51 PM



See embedded comments:

Bruce Nichol wrote:
Quote:
Goo'day, again,

I'll add to that:

1. Use OpenQM's MODIFY to create Dict items. Takes the pain out of
using ED.....
Doing that already. On the other hand, I'm used to ED... WED is also
useful for dictionary items too.
Quote:
2. I used to have a swag of problems centred around I-Type TRANS's in
trying to determine the ID of the file to which I wanted to transfer.
After a few failures in the expression in <F2>, I resorted to
determining the ID and doing the translation in the first statement in
the field's expression, something along the lines of:

0001 I
0002
TRANS("CUSTOMER",OCONV(FIELD(FIELD(@ID,"*",1),"-",2),'MCN'),1,'X')
0003 .....

rather than trying to do it on a step-by-step basis. Dunno why; just
always seemd to work this way......whereas......
Yes, that is useful - when to write a complicated single statement
versus when to write several simpler statements.

Quote:
3. I've now learned about things like FMT EVAL CONV COL.HDG et al,
which in a lot of cases reduces a dictionary to just the one dict item
per field....

I like the Links between files too. That saves a lot of dictionary writing.

Quote:
Go fer it....

Cheers,

Brian


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

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 05:58 PM



Thanks, Tom.

Yes, I've been through the Intro a few times - and usually pick up
something more each time. However, it doesn't go into a lot of detail
on I-descriptors (as I suppose is to be expected in an "Introduction").

Likewise, the tutorial gives an examples of I-descriptors, but you still
have no idea of what you can really achieve using them, or their
limitations.

I shall press on!

Cheers,

Brian

Tom deL wrote:
Quote:
Hi Brian,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

When I started with openQM (from R83/AP/D3 background) I found Martin's
docs quite helpful. While not a big tutorial on this subject, the
'Intro' document is often overlooked as a source of detailed
information:
http://www.openqm.com/downloads/intro.pdf

I think that the name lead me to think that it was a superficial
overview when in fact it answers a _lot_ of questions.

Hope this helps,
-Tom

P.S. Another thing that might be generally helpful to someone coming
from PICK would be spending a little time following the tutorial
contained in:
http://www.openqm.com/downloads/tutorial.pdf


Reply With Quote
  #8  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-07-2006 , 09:32 PM



Goo'day, again, Brian,

Subroutines only have a special structure in the call:

0001 I
0002 SUBR("SUBNAME",@RECORD,@I,....) sort of thing,,,, and in the
subroutine:

0001 SUBROUTINE SUBNAME(X,REC, ID,....)
VAR = Stuff
X = VAR
RETURN

And, you can achieve basically (good choice of word!) anything you
want.... Named common, opening files (if you're not a pedant) sort of
thing... Printing from the subroutine is a "no no" though....
Subroutines are like any other QMBasic programs... DEBUG...etc etc....


On Wed, 08 Mar 2006 12:58:51 +1300, Brian Speirs
<bss59REMOVE_THIS (AT) paradise (DOT) net.nz> wrote:

Quote:
Thanks, Tom.

Yes, I've been through the Intro a few times - and usually pick up
something more each time. However, it doesn't go into a lot of detail
on I-descriptors (as I suppose is to be expected in an "Introduction").

Likewise, the tutorial gives an examples of I-descriptors, but you still
have no idea of what you can really achieve using them, or their
limitations.

I shall press on!

Cheers,

Brian

Tom deL wrote:
Hi Brian,

Does anyone know of any available tutorial on I-Descriptors?

Being used to mvBASE correlatives and conversions, I am finding I-types
to be, well, unusual.

I am using OpenQM, but I also have access to the UniVerse documentation
which does offer a few pages on them - but it still seems largely to
leave it to the user to find how they work by falling into all the pot
holes in the road.

Thanks for any help you may be able to offer.

When I started with openQM (from R83/AP/D3 background) I found Martin's
docs quite helpful. While not a big tutorial on this subject, the
'Intro' document is often overlooked as a source of detailed
information:
http://www.openqm.com/downloads/intro.pdf

I think that the name lead me to think that it was a superficial
overview when in fact it answers a _lot_ of questions.

Hope this helps,
-Tom

P.S. Another thing that might be generally helpful to someone coming
from PICK would be spending a little time following the tutorial
contained in:
http://www.openqm.com/downloads/tutorial.pdf

Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #9  
Old   
dvenus
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-08-2006 , 06:40 AM



Hi!

Are there any other tutorials like the one you posted above? It was
great! I would love to see more information like that.

Thanks!

Dave Venus


Reply With Quote
  #10  
Old   
None
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-08-2006 , 09:10 AM




Quote:
I guess I'm really looking for more examples of what goes on line 2 of
the I descriptor, in standard and unusual cases.
The QM I-type compiler allows just about anything that you can do in
the expression on the right hand side of a Basic assignment. The few
things that are not valid are usually omitted simply because they don't
make sense in an I-type. The data item names used in the expression
must correspond to other items defined in the same dictionary. These
can include othe I-type items.

Where one I-type references another, the nesting is performed at
compile time, not as a subroutine call at run time. This gives a
significant performance advantage but does require that you think
carefully about the impact of changes to the inner I-type. The simplest
thing is to use the CD command to compile every I-type in the
dictionary after a change.

We have extended the language to make it possible to do some things in
the I-type where you would have to execute a subroutine on other
platforms. For example, we have a function call version of LOCATE()
that returns the position value. The SUBSTITUTE() function was
developed to simplify something that actually turns out to be very
difficult without it.

Getting data from another file is doen using TRANS(). Unlike other
environments, our TRANS() is quite happy to bring back a value that is
itself an I-type and hence you can follow a link through a chain of
files (though think carefully about whether this is a sensible thing to
be doing!).

If you get into the delights of compound I-types (multiple semicolon
separated expressions evaluated one after the other), note that QM is
happy to nest compound I-type references so there should be no
restrictions on which items you can access.

If you decide that what you are trying to do is just too complex in an
I-type, you can call a Basic subroutine with SUBR("name") or
SUBR("name", arg1, arg2, ...). This subroutine must return a result via
its first argument just like a function. The called subroutine has
access to the full Basic programming language though there are some
things that might cause problems. For example, if the I-type is being
executed as part of a query, the subroutine cannot do a query processor
SELECT as nested queries are not supported.



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.