dbTalk Databases Forums  

openqm TRANS or XLATE with I type dictionary Item

comp.databases.pick comp.databases.pick


Discuss openqm TRANS or XLATE with I type dictionary Item in the comp.databases.pick forum.



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

Default openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 06:24 AM






http://mvcommunitymap.com/openqm/ind...?qmb_trans.htm

says:

"Examples

TOTAL.VALUE = QTY * TRANS('STOCK', PART.NO, 'PRICE', 'X')

The above statement reads from the STOCK file a record (or list of
records) whose id(s) can be found in the PART.NO variable. The X error
code causes the TRANS() function to return a null value for any record
that cannot be found.

X = TRANS(DICT 'ORDERS', 'DISCOUNT', 'X')

X = TRANS('DICT ORDERS', 'DISCOUNT', 'X')

Both of the above statements perform the same action. Either might be
used, for example, to retrieve an I-type item named DISCOUNT from the
dictionary of the ORDERS file."

I set up orders with demo dict item TEST

1: C
2: @ANS = "1234"
3:
4: ORDERS
5: 5R
6: S

LIST ORDERS TEST

returns "1234" OK

a program:

PRINT TRANS(DICT "ORDERS",1,"TEST","X")
END

formatted as the manual above states - returned is a null value (where
there is an item "1") in ORDERS

I thought the above isn't correct

PRINT TRANS("ORDERS",1,"TEST","X") would be more correct?

with that you get (hex address):Invalid I-type at line number of PROGNAME

Can anyone tell me why this doesn't work per example on website above -
or supply an example ...

would like to use TRANS/XLATE -- or even an OCONV to access the value of
an I type dictionary item with passed

tried setting @ID in the program -- still no luck

Reply With Quote
  #2  
Old   
wilson
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 06:44 AM






Have confused C (calculated type) with I type ---

Is it possible to use TRANS/XLATE with C types?

I would like to access a dictionary C type from a program

Reply With Quote
  #3  
Old   
Kevin Powick
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 09:14 AM



On 2011-02-18 07:24:01 -0500, wilson <wilson435 (AT) hotmail (DOT) co.uk> said:


Quote:
http://mvcommunitymap.com/openqm/ind...?qmb_trans.htm

I haven't looked into this beyond the fact that you're using a copy of
the QM manual from 2007. Perhaps there have been changes to the
command.

However, and more important, that material is copyrighted and shouldn't
be on your website without permission from Ladybridge.

Why not simply link to their up-to-date on-line manual and save
yourself the issues of being outdated and illegal?

http://www.openqm.org/docs/

--
Kevin Powick

Reply With Quote
  #4  
Old   
Martin Phillips
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 09:36 AM



On Feb 18, 12:44*pm, wilson <wilson... (AT) hotmail (DOT) co.uk> wrote:
Quote:
Is it possible to use TRANS/XLATE with C types?
You can use TRANS() in C-types in exactly the same way as in programs.
Alternatively, you can reference another data item defined in the same
dictionary using expressions such as
X = {name}
where name is the item to be referenced. The curly brackets are part
of the syntax.

Quote:
I would like to access a dictionary C type from a program
The ITYPE() function can do this. It can access all data types in QM,
not just I-type items. This includes D/A/S type items which, although
not all that sensible compared to direct reference to the field,
allows a program to access a data item without knowing its type.


Martin Phillips, Ladybridge Systems.

Reply With Quote
  #5  
Old   
Martin Phillips
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 10:09 AM



Some further thoughts on why your original program did no work....

Quote:
PRINT TRANS("ORDERS",1,"TEST","X") would be more correct?
with that you get (hex address):Invalid I-type at line number of PROGNAME
When used in a program (as against a dictionary item), the third
argument to TRANS() must be a field number, not the name of the field.


Martin Phillips, Ladybridge Systems

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

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 10:54 AM



On Fri, 18 Feb 2011 10:14:27 -0500, Kevin Powick wrote:

Quote:
On 2011-02-18 07:24:01 -0500, wilson <wilson435 (AT) hotmail (DOT) co.uk> said:


http://mvcommunitymap.com/openqm/ind...?qmb_trans.htm


I haven't looked into this beyond the fact that you're using a copy of
the QM manual from 2007. Perhaps there have been changes to the
command.

However, and more important, that material is copyrighted and shouldn't
be on your website without permission from Ladybridge.

Why not simply link to their up-to-date on-line manual and save yourself
the issues of being outdated and illegal?

http://www.openqm.org/docs/
no idea what you are talking about - not my website .... ?????

Reply With Quote
  #7  
Old   
wilson
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 10:54 AM



On Fri, 18 Feb 2011 08:09:19 -0800, Martin Phillips wrote:

Quote:
Some further thoughts on why your original program did no work....

PRINT TRANS("ORDERS",1,"TEST","X") would be more correct? with that you
get (hex address):Invalid I-type at line number of PROGNAME

When used in a program (as against a dictionary item), the third
argument to TRANS() must be a field number, not the name of the field.


Martin Phillips, Ladybridge Systems
ok thanks

Reply With Quote
  #8  
Old   
wilson
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 10:59 AM



On Fri, 18 Feb 2011 10:14:27 -0500, Kevin Powick wrote:

Quote:
On 2011-02-18 07:24:01 -0500, wilson <wilson435 (AT) hotmail (DOT) co.uk> said:


http://mvcommunitymap.com/openqm/ind...?qmb_trans.htm


I haven't looked into this beyond the fact that you're using a copy of
the QM manual from 2007. Perhaps there have been changes to the
command.

However, and more important, that material is copyrighted and shouldn't
be on your website without permission from Ladybridge.

Why not simply link to their up-to-date on-line manual and save yourself
the issues of being outdated and illegal?

http://www.openqm.org/docs/
unpleasant officious little man

Reply With Quote
  #9  
Old   
Kevin Powick
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 01:03 PM



On 2011-02-18 11:54:06 -0500, wilson <wilson435 (AT) hotmail (DOT) co.uk> said:

Quote:
no idea what you are talking about - not my website .... ?????
Apologies. I was under the impression that is was.

--
Kevin Powick

Reply With Quote
  #10  
Old   
Kevin Powick
 
Posts: n/a

Default Re: openqm TRANS or XLATE with I type dictionary Item - 02-18-2011 , 01:04 PM



On 2011-02-18 11:59:26 -0500, wilson <wilson435 (AT) hotmail (DOT) co.uk> said:

Quote:
unpleasant officious little man
Had to be a dick about an honest mistake, eh?

--
Kevin Powick

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.