Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Bill Haskett
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:* p...@gnosys.co.nz
*To:* U2 Users List 
*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: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Friday, 16 August 2013 9:06 a.m.
To: U2 Users List
Cc: u2-users-boun...@listserver.u2ug.org
Subject: Re: [U2] @RECORD VARIABLES

Of course. Worked like a charm.

Thank you Dave.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Dave Davis 
To: U2 Users List ,
Date:   08/15/2013 03:41 PM
Subject:    Re: [U2] @RECORD VARIABLES
Sent by:u2-users-boun...@listserver.u2ug.org



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: u2-users-boun...@listserver.u2ug.org [ 
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Thursday, August 15, 2013 4:35 PM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
 [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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

--
This email was

Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Charles_Shaffer
In Unidata I believe that it only works for virtual (type = V) attributes. 
 It is nice though. If you have an attribute that reads  from other files 
and performs calculations, formatting, etc. it executes the virtual and 
gives you the output.  Let's you take advantage of the virtual attributes 
already defined in the dictionary.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Phil Walker 
To: U2 Users List , 
Date:   08/15/2013 04:11 PM
Subject:Re: [U2] @RECORD VARIABLES
Sent by:u2-users-boun...@listserver.u2ug.org



Is that only a Unidata thing? Sounds like a nice feature to have in 
Universe.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org [
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Friday, 16 August 2013 9:06 a.m.
To: U2 Users List
Cc: u2-users-boun...@listserver.u2ug.org
Subject: Re: [U2] @RECORD VARIABLES

Of course. Worked like a charm. 

Thank you Dave.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Dave Davis 
To: U2 Users List , 
Date:   08/15/2013 03:41 PM
Subject:Re: [U2] @RECORD VARIABLES
Sent by:u2-users-boun...@listserver.u2ug.org



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: u2-users-boun...@listserver.u2ug.org [ 
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Thursday, August 15, 2013 4:35 PM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Charles_Shaffer
I only know Unidata.  Maybe someone else knows.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Phil Walker
Is that only a Unidata thing? Sounds like a nice feature to have in 
Universe.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Friday, 16 August 2013 9:06 a.m.
To: U2 Users List
Cc: u2-users-boun...@listserver.u2ug.org
Subject: Re: [U2] @RECORD VARIABLES

Of course. Worked like a charm. 

Thank you Dave.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Dave Davis 
To: U2 Users List , 
Date:   08/15/2013 03:41 PM
Subject:Re: [U2] @RECORD VARIABLES
Sent by:u2-users-boun...@listserver.u2ug.org



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: u2-users-boun...@listserver.u2ug.org [ 
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Thursday, August 15, 2013 4:35 PM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Charles_Shaffer
Of course. Worked like a charm. 

Thank you Dave.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation



From:   Dave Davis 
To: U2 Users List , 
Date:   08/15/2013 03:41 PM
Subject:Re: [U2] @RECORD VARIABLES
Sent by:u2-users-boun...@listserver.u2ug.org



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: u2-users-boun...@listserver.u2ug.org [
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Thursday, August 15, 2013 4:35 PM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] @RECORD VARIABLES

2013-08-15 Thread Dave Davis
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: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of 
charles_shaf...@ntn-bower.com
Sent: Thursday, August 15, 2013 4:35 PM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, Research & Development

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] @RECORD VARIABLES

2013-08-15 Thread Charles_Shaffer
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users