Isn't this pretty much the same thing as ITYPE(), except the conversions are processed?

In the CALCULATE() form, the dictionary.item can be a quoted string
or a UniBasic variable. The expression uses the data from the current
@RECORD during the evaluation process.

In the {} form, the dictionary.item must be the literal dictionary
name with no quotation marks.

You must open a dictionary to @DICT and read the data record into
@RECORD for the function to work properly.

If these functions are successful, they update the values in @CONV,
@FORMAT, and @HEADER. You can then use these @ variables in other
UniBasic functions, such as ICONV, OCONV, and FMT. For more information
about @ variables, see Appendix B, "UniBasic@variables."

-----

The UniBasic ITYPE function enables a UniBasic program to execute
a UniData virtual attribute from the dictionary of a UniData file.
The value of the function is the same as if it were run using UniQuery
or UniData SQL.

Note:  ITYPE generally requires you to open both the dictionary and
data portions of the file. Before you use this function, you must
compile the dictionary of the file by using the ECL COMPILE.DICT
or CD command.

In most cases, you also must assign the @ID and @RECORD variables.
These variables resolve the value of the ITYPE function. However,
if neither the ID of the file nor the data from the record is used
in the ITYPE, you do not need to assign these variables.

Note: Conversion or formatting codes in the dictionary record of
the virtual attribute does not affect the value ITYPE returns.

Bill
Untitled Page


------------------------------------------------------------------------
----- Original Message -----
*From:* [email protected]
*To:* U2 Users List <[email protected]>
*Date:* 8/15/2013 2:10 PM
*Subject:* Re: [U2] @RECORD VARIABLES
Is that only a Unidata thing? Sounds like a nice feature to have in 
Universe.....

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Friday, 16 August 2013 9:06 a.m.
To: U2 Users List
Cc: [email protected]
Subject: Re: [U2] @RECORD VARIABLES

Of course. Worked like a charm.

Thank you Dave.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Dave Davis <[email protected]>
To:     U2 Users List <[email protected]>,
Date:   08/15/2013 03:41 PM
Subject:        Re: [U2] @RECORD VARIABLES
Sent by:        [email protected]



HELP CALCULATE

You have to have your dictionary open to @DICT as well.

I think you want to say

RESULT = CALCULATE(ATTRIBUTE)

Since {} is for a literal attribute name only.
-----Original Message-----
From: [email protected] [ 
mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Thursday, August 15, 2013 4:35 PM
To: [email protected]
Subject: [U2] @RECORD VARIABLES

I am attempting to pass a variable into a SUBROUTINE and use it to access the 
data through the dictionary name.

SUBROUTINE fieldLookup(....., ATTRIBUTE, ....) .
.
.
READ @RECORD FROM F.FILE, @ID THEN
         RESULT = {ATTRIBUTE}
END ELSE
         RESULT = ""
END

The part that isn't working is the RESULT = {ATTRIBUTE}

As written here it is looking for a dictionary attribute named ATTRIBUTE.
I tried forcing it to evaluate the variable ATTRIBUTE to the value in ATTRIBUTE 
by putting it in parenthesis, but it complained that it was expecting a 
variable when it was compiling.
Is there a way to use a variable in the curly braces so that I can make this a 
generic subroutine?

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
________________________________


Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: [email protected]
         [http://www.harriscomputer.com/images/signatures/HarrisSchools.jpg
]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<
http://www.harriscomputer.com/>
         6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.com<http://www.harris-schoolsolutions.com>

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it.
If you have received this message in error, please notify the sender 
immediately by e-mail and delete all copies of the message.

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

--
This email was Virus checked by UTM 9. http://www.astaro.com

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to