RE: EVAL

2004-03-12 Thread Phil Walker
I seem to remember, and I must stress vaguely, that in SQL it depended on
the justification of the left hand operand.

Phil Walker
+64 21 336294
[EMAIL PROTECTED]
infocusp limited
\\ PO Box 77032, Auckland New Zealand \ www.infocusp.co.nz
DISCLAIMER:  This electronic message together with any attachments is
confidential.  If you are not the intended recipient, do not copy, disclose
or use the contents in any way. Please also advise us by return e-mail that
you have received the message and then please destroy. infocusp limited is
not responsible for any changes made to this message and / or any
attachments after sending by infocusp limited. We use virus scanning
software but exclude all liability for viruses or anything similar in this
email or any attachment

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Ray Wurlod
Sent: Friday, March 12, 2004 9:58 PM
To: U2 Users Discussion List
Subject: RE: EVAL

The result of every EVAL is (deemed to be) a string.
Try using both FMT and CONV field qualifiers.  FMT for the right
justification and CONV to try to convince the query engine that it's dealing
with numbers - either the "MD" or the "MR" conversion should do it.
LIST file EVAL "expression" CONV "MD0" FMT "10R"
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-12 Thread Ray Wurlod
The result of every EVAL is (deemed to be) a string.
Try using both FMT and CONV field qualifiers.  FMT for the right justification and 
CONV to try to convince the query engine that it's dealing with numbers - either the 
"MD" or the "MR" conversion should do it.
LIST file EVAL "expression" CONV "MD0" FMT "10R"
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Dave Davis
Yes but its not the same, and doesn't help if the EVAL result can be negative (unless 
you add a large enough number to it to make all results positive).



From: [EMAIL PROTECTED] on behalf of Randy Gill
Sent: Thu 3/11/2004 3:50 PM
To: U2 Users Discussion List
Subject: RE: EVAL



Okay.

Alternately, perhaps something like this would work (again, works on
UniVerse...):

LIST CUSTOMER NAME BY.DSND EVAL "FMT(LEN(NAME),'2R')"

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 2:53 PM
To: U2 Users Discussion List
Subject: RE: EVAL

Tried that before and it still sorted left (on UniData).  That's why I
asked.



From: [EMAIL PROTECTED] on behalf of Randy Gill
Sent: Thu 3/11/2004 3:27 PM
To: U2 Users Discussion List
Subject: RE: EVAL



Yes, I use this feature often in UniVerse (running in PI/OPEN flavor).

Suppose I wanted to list the customers with the longest names, I would
use:

LIST CUSTOMER NAME BY.DSND EVAL "LEN(NAME)" FMT "2R"

Since the default is left justification, if I omitted the 'FMT "2R"',
all the customers with 9-character names would be sorted before those
with 10+ character names!  The FMT clause causes it to sort as one would
expect.

Hope this helps.

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 9:23 AM
To: U2 Users Discussion List
Subject: RE: EVAL

On the use of FMT to affect the justification of an EVAL field, can this
be used to affect a sort by an EVAL field?  It doesn't seem to affect it
when I do it in unidata.


Our company accepts no liability for the content of this email, or for
the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Stu Glancy
Then try this idea:   EVAL "FMT(LEN(NAME),"R#4")" AS SORTORD BY.DSND SORTORD



Stu Glancy
Asset Management Outsourcing, Inc.
Senior Analyst/DBA
770-792-3907

> Tried that before and it still sorted left (on UniData).  That's why I
> asked.
>
> 
>
> From: [EMAIL PROTECTED] on behalf of Randy Gill
> Sent: Thu 3/11/2004 3:27 PM
> To: U2 Users Discussion List
> Subject: RE: EVAL
>
>
>
> Yes, I use this feature often in UniVerse (running in PI/OPEN flavor).
>
> Suppose I wanted to list the customers with the longest names, I would
> use:
>
> LIST CUSTOMER NAME BY.DSND EVAL "LEN(NAME)" FMT "2R"
>
> Since the default is left justification, if I omitted the 'FMT "2R"',
> all the customers with 9-character names would be sorted before those
> with 10+ character names!  The FMT clause causes it to sort as one would
> expect.
>
> Hope this helps.
>
> Randy
>
> -----Original Message-
> From: Dave Davis [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 9:23 AM
> To: U2 Users Discussion List
> Subject: RE: EVAL
>
> On the use of FMT to affect the justification of an EVAL field, can this
> be used to affect a sort by an EVAL field?  It doesn't seem to affect it
> when I do it in unidata.
>
>
> Our company accepts no liability for the content of this email, or for
> the
> consequences of any actions taken on the basis of the information
> provided, unless that information is subsequently confirmed in writing.
> Any views or opinions presented in this email are solely those of the
> author and do not necessarily represent those of the company.
> WARNING: Computer viruses can be transmitted via email.
> The recipient should check this email and any attachments for the
> presence of viruses. The company accepts no liability for any damage
> caused by any virus transmitted by this email.
> 11/29/2003 ACE Software, LLC
>
> --
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>
>
>
> --
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Randy Gill
Okay.

Alternately, perhaps something like this would work (again, works on
UniVerse...):

LIST CUSTOMER NAME BY.DSND EVAL "FMT(LEN(NAME),'2R')"

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 2:53 PM
To: U2 Users Discussion List
Subject: RE: EVAL

Tried that before and it still sorted left (on UniData).  That's why I
asked.



From: [EMAIL PROTECTED] on behalf of Randy Gill
Sent: Thu 3/11/2004 3:27 PM
To: U2 Users Discussion List
Subject: RE: EVAL



Yes, I use this feature often in UniVerse (running in PI/OPEN flavor).

Suppose I wanted to list the customers with the longest names, I would
use:

LIST CUSTOMER NAME BY.DSND EVAL "LEN(NAME)" FMT "2R"

Since the default is left justification, if I omitted the 'FMT "2R"',
all the customers with 9-character names would be sorted before those
with 10+ character names!  The FMT clause causes it to sort as one would
expect.

Hope this helps.

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 9:23 AM
To: U2 Users Discussion List
Subject: RE: EVAL

On the use of FMT to affect the justification of an EVAL field, can this
be used to affect a sort by an EVAL field?  It doesn't seem to affect it
when I do it in unidata.


Our company accepts no liability for the content of this email, or for
the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Dave Davis
Tried that before and it still sorted left (on UniData).  That's why I asked.



From: [EMAIL PROTECTED] on behalf of Randy Gill
Sent: Thu 3/11/2004 3:27 PM
To: U2 Users Discussion List
Subject: RE: EVAL



Yes, I use this feature often in UniVerse (running in PI/OPEN flavor).

Suppose I wanted to list the customers with the longest names, I would
use:

LIST CUSTOMER NAME BY.DSND EVAL "LEN(NAME)" FMT "2R"

Since the default is left justification, if I omitted the 'FMT "2R"',
all the customers with 9-character names would be sorted before those
with 10+ character names!  The FMT clause causes it to sort as one would
expect.

Hope this helps.

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 9:23 AM
To: U2 Users Discussion List
Subject: RE: EVAL

On the use of FMT to affect the justification of an EVAL field, can this
be used to affect a sort by an EVAL field?  It doesn't seem to affect it
when I do it in unidata.


Our company accepts no liability for the content of this email, or for
the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Randy Gill
Yes, I use this feature often in UniVerse (running in PI/OPEN flavor).

Suppose I wanted to list the customers with the longest names, I would
use:

LIST CUSTOMER NAME BY.DSND EVAL "LEN(NAME)" FMT "2R"

Since the default is left justification, if I omitted the 'FMT "2R"',
all the customers with 9-character names would be sorted before those
with 10+ character names!  The FMT clause causes it to sort as one would
expect.

Hope this helps.

Randy

-Original Message-
From: Dave Davis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 9:23 AM
To: U2 Users Discussion List
Subject: RE: EVAL

On the use of FMT to affect the justification of an EVAL field, can this
be used to affect a sort by an EVAL field?  It doesn't seem to affect it
when I do it in unidata.
 

Our company accepts no liability for the content of this email, or for
the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Michael D. Ballard
On UniVerse, the system seems to assume left-justified comparison unless 
you specify something different using FMT.  Try this:
SELECT ... WITH EVAL"F16 * 0.9" FMT"10R" < F17
You can also specify a conversion much the same way:
SELECT ... WITH EVAL"F16 * 0.9" CONV"MD2" FMT"10R" < F17
Is there a way to assign a justification to an EVAL item other than having 
it use the justification of a field used in the formula?  I know you can 
assign different formatting and conversion.
EVAL "FIELD_W_DESIRED_CONV;F16 * 0.9" < F17

Since the first 'sentence', FIELD_W_DESIRED_CONV, is not referenced in the 
final evaluation it doesn't affect the result, only the conversion used.

Karjala


Michael D. Ballard
[EMAIL PROTECTED]  

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Bob Witney
LIST FILE EVAL "@ID * 0.10 '9R3'"

-Original Message-
From: Karjala Koponen [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 15:03
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: EVAL


>>> [EMAIL PROTECTED] 03/11/2004 8:50:56 AM >>>
Is there a way to assign a justification to an EVAL item other than having
it use the justification of a field used in the formula?  I know you can
assign different formatting and conversion.


EVAL seems to use the formatting and conversion of the first field in the
phrase, so I have entered a field that has nothing to do with the
calculation at hand but has the conversion I want as a first 'sentence' in
the phrase as follows:

EVAL "FIELD_W_DESIRED_CONV;F16 * 0.9" < F17

Since the first 'sentence', FIELD_W_DESIRED_CONV, is not referenced in the
final evaluation it doesn't affect the result, only the conversion used.

Karjala
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

Confidentiality Notice: This e-mail and any attachments are 
intended solely for the addressee and may contain confidential or 
privileged information. If you are not the named addressee, or the 
person responsible for delivering the message to the named 
addressee, please notify the sender as soon as possible and delete 
the material from your computer. This message will be protected by 
copyright. If it has come to you in error, you must not take any 
action based on its contents nor must you copy or show the message 
to any person other than the intended recipient.



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Dave Davis
On the use of FMT to affect the justification of an EVAL field, can this be used to 
affect a sort by an EVAL field?  It doesn't seem to affect it when I do it in unidata.
 

Our company accepts no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Karjala Koponen
>>> [EMAIL PROTECTED] 03/11/2004 8:50:56 AM >>>
Is there a way to assign a justification to an EVAL item other than having it use the 
justification of a field used in the formula?  I know you can assign different 
formatting and conversion.


EVAL seems to use the formatting and conversion of the first field in the phrase, so I 
have entered a field that has nothing to do with the calculation at hand but has the 
conversion I want as a first 'sentence' in the phrase as follows:

EVAL "FIELD_W_DESIRED_CONV;F16 * 0.9" < F17

Since the first 'sentence', FIELD_W_DESIRED_CONV, is not referenced in the final 
evaluation it doesn't affect the result, only the conversion used.

Karjala
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Stevenson, Charles
> Is there a way to assign a justification to an EVAL item 
> other than having it use the justification of a field used in 
> the formula?  I know you can assign different formatting and 
> conversion.

The justification is assigned in the FMT, not independently as you do in
pick-style dictionary A- & S-items.

For example, for a right justified sort:

   SELECT ... BY EVAL "" FMT "10R"

Likewise there are other keywords to specify other attributes that would
normally be in an I-descriptor: CONV, MULTIVALUED, SINGLEVALUED, ASSOC,
ASSOC.WITH.   Those all have synonyms.

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Brian Leach
> Is there a way to assign a justification to an EVAL item 
> other than having it use the justification of a field used in 
> the formula?  I know you can assign different formatting and 
> conversion.
> 
Yes, use the FMT keyword.

Brian. 




This email was checked on leaving Microgen for viruses, similar
malicious code and inappropriate content by MessageLabs SkyScan.

DISCLAIMER

This email and any attachments are confidential and may also be
privileged.

If you are not the named recipient, please notify the sender
immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information.

In the event of any technical difficulty with this email, please
contact the sender or [EMAIL PROTECTED]

Microgen Information Management Solutions
http://www.microgen.co.uk
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Dave Davis
Is there a way to assign a justification to an EVAL item other than having it use the 
justification of a field used in the formula?  I know you can assign different 
formatting and conversion.

2. You might be tempted to do:

 WITH EVAL "F16 * 0.9" < F17
 (or WHEN  '''''' ''   for multivalued data)

which will probably work, but with EVALs you sometimes need to include
explicit formatting & conversion on the command line.   RetrieVe
sometimes outsmarts itself when sorting BY an EVAL or using an EVAL as a
display column.  By default it sometimes assigns to the EVAL the
conversion & justification of an element inside the EVAL.   Annoying,
that.   All this makes Martin's answer better, since it is more
explicit.


http://www.oliver.com/mailman/listinfo/u2-users


Our company accepts no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: EVAL

2004-03-11 Thread Schalk van Zyl
Yes, single valued and Pick.
This works for me.
Thanks all.
Schalk

On Thu, 11 Mar 2004 08:30:02 -0500, Stevenson, Charles 
<[EMAIL PROTECTED]> wrote:

> Can somebody help me with the syntax of EVAL.  I want to execute a
> SELECT on a file to get all records where (field 16)*0.9 <
field(17).
Various ways to do this.  Try...
   SELECT file WITH EVAL "F16 * 0.9 < F17" = 1
where F16 and F17 are field names from the dictionary.
The most common mistake is to miss off the = 1 at the end.
Remember, this EVAL expression is going to return true or false.


1. Yes, but put quotes around the final literal 1:

 WITH EVAL "F16 * 0.9 < F17" = "1"

or it will try to find a record called "1" in both the dictionary and
VOC.  Many Pick-style dicts have that.  Even if it doesn't exist today,
it might in the future.
2. You might be tempted to do:

 WITH EVAL "F16 * 0.9" < F17
 (or WHEN  '''''' ''   for multivalued data)
which will probably work, but with EVALs you sometimes need to include
explicit formatting & conversion on the command line.   RetrieVe
sometimes outsmarts itself when sorting BY an EVAL or using an EVAL as a
display column.  By default it sometimes assigns to the EVAL the
conversion & justification of an element inside the EVAL.   Annoying,
that.   All this makes Martin's answer better, since it is more
explicit.
3. If you use Pick-style dictionaries,  you can still use EVALs, and you
can extract the fields you want:
 WITH EVAL "@RECORD<16> * 0.9 < @RECORD<17>" = "1"

4. All this assumes single-valued fields, right?  Let us know, because
if either F16 or F17 are multi-valued,  you'll need a variation on the
theme by using "LTS" function and/or the WHEN keyword.
Chas. Stevenson


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
GWK BEPERK/LIMITED (REG: 1997/022252/06)
POSBUS 47 PO BOX 8730
DOUGLAS
Direkteure/Directors: NB Jacobs, FJ Lawrence, J v/d S Botes,
JH Coetzee, JGD Smit, JF Jacobs, AO Müller, JW Smit,
JP Snyman, JG Stander, JH van Dyk(MD/BD), JG Jacobs, A Müller,
Sekr/Secr: E van Niekerk.
Hierdie e-pos is onderworpe aan 'n vrywaring beskikbaar by:
http://www.gwk.co.za/DisclaimerVrywaring.asp
This e-mail is subjected to the disclaimer that can be viewed at:
http://www.gwk.co.za/DisclaimerVrywaring.asp
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Stevenson, Charles
> > Can somebody help me with the syntax of EVAL.  I want to execute a 
> > SELECT on a file to get all records where (field 16)*0.9 < 
> field(17).
> 
> Various ways to do this.  Try...
>SELECT file WITH EVAL "F16 * 0.9 < F17" = 1
> where F16 and F17 are field names from the dictionary.
> 
> The most common mistake is to miss off the = 1 at the end.  
> Remember, this EVAL expression is going to return true or false.


1. Yes, but put quotes around the final literal 1:

 WITH EVAL "F16 * 0.9 < F17" = "1"

or it will try to find a record called "1" in both the dictionary and
VOC.  Many Pick-style dicts have that.  Even if it doesn't exist today,
it might in the future.


2. You might be tempted to do:

 WITH EVAL "F16 * 0.9" < F17
 (or WHEN  '''''' ''   for multivalued data)

which will probably work, but with EVALs you sometimes need to include
explicit formatting & conversion on the command line.   RetrieVe
sometimes outsmarts itself when sorting BY an EVAL or using an EVAL as a
display column.  By default it sometimes assigns to the EVAL the
conversion & justification of an element inside the EVAL.   Annoying,
that.   All this makes Martin's answer better, since it is more
explicit.


3. If you use Pick-style dictionaries,  you can still use EVALs, and you
can extract the fields you want:

 WITH EVAL "@RECORD<16> * 0.9 < @RECORD<17>" = "1"


4. All this assumes single-valued fields, right?  Let us know, because
if either F16 or F17 are multi-valued,  you'll need a variation on the
theme by using "LTS" function and/or the WHEN keyword.  


Chas. Stevenson
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Bob Witney
So I do :-)

-Original Message-
From: Anthony Youngman [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 12:59
To: U2 Users Discussion List
Subject: RE: EVAL


I think you mean

LIST FILE WHEN EVAL "F16 * 0.9" LT F17

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Bob Witney
Sent: 11 March 2004 12:40
To: 'U2 Users Discussion List'
Subject: RE: EVAL

LIST FILE WHEN EVAL "F16 * 0.9" LT F16

-Original Message-
From: Schalk van Zyl [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 19:21
To: U2 Users Discussion List
Subject: EVAL


U2-ers,

UNIVERSE.
Can somebody help me with the syntax of EVAL.  I want to execute a SELECT on
a file to get all records where (field 16)*0.9 < field(17).
Thanks.
Schalk

-
GWK BEPERK/LIMITED (REG: 1997/022252/06)
POSBUS 47 PO BOX 8730
DOUGLAS

Direkteure/Directors: NB Jacobs, FJ Lawrence, J v/d S Botes,
JH Coetzee, JGD Smit, JF Jacobs, AO Müller, JW Smit,
JP Snyman, JG Stander, JH van Dyk(MD/BD), JG Jacobs, A Müller,
Sekr/Secr: E van Niekerk.

Hierdie e-pos is onderworpe aan 'n vrywaring beskikbaar by:
http://www.gwk.co.za/DisclaimerVrywaring.asp
This e-mail is subjected to the disclaimer that can be viewed at:
http://www.gwk.co.za/DisclaimerVrywaring.asp


Confidentiality Notice: This e-mail and any attachments are 
intended solely for the addressee and may contain confidential or 
privileged information. If you are not the named addressee, or the 
person responsible for delivering the message to the named 
addressee, please notify the sender as soon as possible and delete 
the material from your computer. This message will be protected by 
copyright. If it has come to you in error, you must not take any 
action based on its contents nor must you copy or show the message 
to any person other than the intended recipient.


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users





***

This transmission is intended for the named recipient only. It may contain
private and confidential information. If this has come to you in error you
must not act on anything disclosed in it, nor must you copy it, modify it,
disseminate it in any way, or show it to anyone. Please e-mail the sender to
inform us of the transmission error or telephone ECA International
immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911
7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1
212 582 2333.


***

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

Confidentiality Notice: This e-mail and any attachments are 
intended solely for the addressee and may contain confidential or 
privileged information. If you are not the named addressee, or the 
person responsible for delivering the message to the named 
addressee, please notify the sender as soon as possible and delete 
the material from your computer. This message will be protected by 
copyright. If it has come to you in error, you must not take any 
action based on its contents nor must you copy or show the message 
to any person other than the intended recipient.


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Anthony Youngman
I think you mean

LIST FILE WHEN EVAL "F16 * 0.9" LT F17

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Witney
Sent: 11 March 2004 12:40
To: 'U2 Users Discussion List'
Subject: RE: EVAL

LIST FILE WHEN EVAL "F16 * 0.9" LT F16

-Original Message-
From: Schalk van Zyl [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 19:21
To: U2 Users Discussion List
Subject: EVAL


U2-ers,

UNIVERSE.
Can somebody help me with the syntax of EVAL.  I want to execute a SELECT on a file to 
get all records where (field 16)*0.9 < field(17).
Thanks.
Schalk

-
GWK BEPERK/LIMITED (REG: 1997/022252/06)
POSBUS 47 PO BOX 8730
DOUGLAS

Direkteure/Directors: NB Jacobs, FJ Lawrence, J v/d S Botes,
JH Coetzee, JGD Smit, JF Jacobs, AO Müller, JW Smit,
JP Snyman, JG Stander, JH van Dyk(MD/BD), JG Jacobs, A Müller,
Sekr/Secr: E van Niekerk.

Hierdie e-pos is onderworpe aan 'n vrywaring beskikbaar by:
http://www.gwk.co.za/DisclaimerVrywaring.asp
This e-mail is subjected to the disclaimer that can be viewed at:
http://www.gwk.co.za/DisclaimerVrywaring.asp


Confidentiality Notice: This e-mail and any attachments are 
intended solely for the addressee and may contain confidential or 
privileged information. If you are not the named addressee, or the 
person responsible for delivering the message to the named 
addressee, please notify the sender as soon as possible and delete 
the material from your computer. This message will be protected by 
copyright. If it has come to you in error, you must not take any 
action based on its contents nor must you copy or show the message 
to any person other than the intended recipient.


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




***

This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Brian Leach

Schalk,

SELECT file WITH EVAL "(@RECORD<16> * .9 > @RECORD<17>)" = 1

Assuming that both fields are stored scaled to the same number of decimal
places.

Brian Leach 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Schalk van Zyl
> Sent: 11 March 2004 19:21
> To: U2 Users Discussion List
> Subject: EVAL
> 
> U2-ers,
> 
> UNIVERSE.
> Can somebody help me with the syntax of EVAL.  I want to 
> execute a SELECT on a file to get all records where (field 
> 16)*0.9 < field(17).
> Thanks.
> Schalk
> 
> -
> GWK BEPERK/LIMITED (REG: 1997/022252/06) POSBUS 47 PO BOX 8730 DOUGLAS
> 
> Direkteure/Directors: NB Jacobs, FJ Lawrence, J v/d S Botes, 
> JH Coetzee, JGD Smit, JF Jacobs, AO Müller, JW Smit, JP 
> Snyman, JG Stander, JH van Dyk(MD/BD), JG Jacobs, A Müller,
> Sekr/Secr: E van Niekerk.
> 
> Hierdie e-pos is onderworpe aan 'n vrywaring beskikbaar by:
> http://www.gwk.co.za/DisclaimerVrywaring.asp
> This e-mail is subjected to the disclaimer that can be viewed at:
> http://www.gwk.co.za/DisclaimerVrywaring.asp
> 
> 



This email was checked on leaving Microgen for viruses, similar
malicious code and inappropriate content by MessageLabs SkyScan.

DISCLAIMER

This email and any attachments are confidential and may also be
privileged.

If you are not the named recipient, please notify the sender
immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information.

In the event of any technical difficulty with this email, please
contact the sender or [EMAIL PROTECTED]

Microgen Information Management Solutions
http://www.microgen.co.uk
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: EVAL

2004-03-11 Thread Martin Phillips
Hi Schalk,

> Can somebody help me with the syntax of EVAL.  I want to execute a SELECT
> on a file to get all records where (field 16)*0.9 < field(17).

Various ways to do this.  Try...
   SELECT file WITH EVAL "F16 * 0.9 < F17" = 1
where F16 and F17 are field names from the dictionary.

The most common mistake is to miss off the = 1 at the end.  Remember, this
EVAL expression is going to return true or false.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL

2004-03-11 Thread Bob Witney
LIST FILE WHEN EVAL "F16 * 0.9" LT F16

-Original Message-
From: Schalk van Zyl [mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 19:21
To: U2 Users Discussion List
Subject: EVAL


U2-ers,

UNIVERSE.
Can somebody help me with the syntax of EVAL.  I want to execute a SELECT 
on a file to get all records where (field 16)*0.9 < field(17).
Thanks.
Schalk

-
GWK BEPERK/LIMITED (REG: 1997/022252/06)
POSBUS 47 PO BOX 8730
DOUGLAS

Direkteure/Directors: NB Jacobs, FJ Lawrence, J v/d S Botes,
JH Coetzee, JGD Smit, JF Jacobs, AO Müller, JW Smit,
JP Snyman, JG Stander, JH van Dyk(MD/BD), JG Jacobs, A Müller,
Sekr/Secr: E van Niekerk.

Hierdie e-pos is onderworpe aan 'n vrywaring beskikbaar by:
http://www.gwk.co.za/DisclaimerVrywaring.asp
This e-mail is subjected to the disclaimer that can be viewed at:
http://www.gwk.co.za/DisclaimerVrywaring.asp


Confidentiality Notice: This e-mail and any attachments are 
intended solely for the addressee and may contain confidential or 
privileged information. If you are not the named addressee, or the 
person responsible for delivering the message to the named 
addressee, please notify the sender as soon as possible and delete 
the material from your computer. This message will be protected by 
copyright. If it has come to you in error, you must not take any 
action based on its contents nor must you copy or show the message 
to any person other than the intended recipient.


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-10 Thread Kevin Michaelsen
Thanks Stu and Ken the line worked flawlessly.

kevin

At 05:43 PM 2/5/2004 -0500, you wrote:
On line 9, you left out the EVAL.  See line 8 to see your mistake.
-Original Message-
From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 3:57 PM
To: U2 Users Discussion List
Subject: RE: EVAL and LIKE
Stu and everyone else,

Thanks for sticking with me but I'm going to  ask you to take a look one 
more time. I inserted your suggestion in line 9 This time I include my 
full paragraph and the error message that comes up is a syntax error. 
Anyone else reading please feel free to contribute. Many thanks for any 
thoughts.

kevin

001: PA RUNS FIN AID 
STATS
002: LIST CS.2004 
\
003: WITH H.CS.APPL.START.TERM = 
'04/FA'\
004: WITH H.CS.ACCEPTS = Y 
\
005: BY H.CS.APPL.ADMIT.STATUS BREAK.ON H.CS.APPL.ADMIT.STATUS 
\
006: TOTAL COUNTER TOTAL EVAL "IF(H.HCG.AWARDED.ALL>
 0) THEN COUNTER ELSE 0" FMT '5' COL.HDG "W/HCG" 
\
007: TOTAL H.HCG.AWARDED.ALL AVERAGE H.HCG.AWARDED.ALL NO.NULLS 
\
008: TOTAL EVAL "IF(H.CS.ADM.EST.NEED = 'Incomplete')THEN COUNTER ELSE 
0"  \
009: TOTAL (INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED 
,'Incompl
ete',1)) 
\
010: HEADER "'C' Financial Aid stats'LL''TC''LL'" ID.SUP DET.SUP



At 02:50 PM 2/5/2004 -0500, you wrote:
It's hard to help without seeing your error msgs.  The [1] means the last 
byte of FIELD.NAME.  If any byte could contain "*" then perhaps 
(INDEX(FIELD.NAME,'*',1) OR INDEX(FIELD.NAME,'Incomplete',1)) would 
work.  This should work in UNIQUERY.  I tried in on UniVerse and it works 
and should work on UniData.
-Original Message-
From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 12:16 PM
To: U2 Users Discussion List
Subject: RE: EVAL and LIKE

I tried it. It didn't seem to work but maybe I didn't do it right. I did 
include the [1] in there. I'm a newbie, was I not suppose to. I'm also 
running this in a UNIQUERY statement at the colon prompt. Would that have 
anything to do with it not running properly. Thanks for whatever light 
you can shed on my case.

kevin

At 11:24 AM 2/5/2004 -0500, you wrote:
Perhaps this will help:

EVAL "IF (FIELD.NAME[1] = "*" OR INDEX(FIELD.NAME,'Incomplete',1)) THEN 
1 ELSE 0"
-Original Message-
From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: EVAL and LIKE

I'm trying to get this statement to work:
Basically I'm trying to count the number of records that have a 
FIELD.NAME that has an "*" or an "Incomplete".

TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN COUNTER 
ELSE 0"

Thanks for any assistance.

Kevin
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-07 Thread Sami Pierre Massarany
Dear Kevin

Try this

EVAL “IF FIELD.NAME[1] = ‘*’ THEN 1 ELSE IF INDEX(FIELD.NAME,'Incomplete',1)
THEN 1 ELSE 0"

Regards

Sami Pierre Massarany
Mobile: 0414 408 229 or +61 414 408 229

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Kevin Michaelsen
Sent: Friday, 6 February 2004 3:14 AM
To: [EMAIL PROTECTED]
Subject: EVAL and LIKE

I'm trying to get this statement to work:
Basically I'm trying to count the number of records that have a FIELD.NAME
that has an "*" or an "Incomplete".

TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN COUNTER ELSE
0"

Thanks for any assistance.

Kevin
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Stu Glancy
Ken, you responded:

"TOTAL EVAL "(INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED
,'Incomplete',1))" \

Though I suspect that wouldn't actually do what you want because the INDEX
function returns an offset, not just 1 or zero.  You'll have to make the
EVAL statement more complex with some IF statements."

This is a logical OR statement returning 1 or 0.  The INDEX functions are
not there it get a location but to indicate the presence or non-presence of
the strings.  The results are evaluated in the OR.
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Stu Glancy



On 
line 9, you left out the EVAL.  See line 8 to see your 
mistake.

  -Original Message-From: Kevin Michaelsen 
  [mailto:[EMAIL PROTECTED]Sent: Thursday, February 05, 2004 
  3:57 PMTo: U2 Users Discussion ListSubject: RE: EVAL and 
  LIKEStu and everyone else,Thanks for sticking 
  with me but I'm going to  ask you to take a look one more time. I 
  inserted your suggestion in line 9 This time I include my full paragraph and 
  the error message that comes up is a syntax error. Anyone else reading please 
  feel free to contribute. Many thanks for any 
  thoughts.kevin001: PA RUNS FIN AID 
  STATS  
  002: LIST CS.2004 
  \ 
  003: WITH H.CS.APPL.START.TERM = 
  '04/FA'\   
  004: WITH H.CS.ACCEPTS = Y 
  \    
  005: BY H.CS.APPL.ADMIT.STATUS BREAK.ON H.CS.APPL.ADMIT.STATUS 
  \    
  006: TOTAL COUNTER TOTAL EVAL "IF(H.HCG.AWARDED.ALL> 0) THEN 
  COUNTER ELSE 0" FMT '5' COL.HDG "W/HCG" 
  \  
  007: TOTAL H.HCG.AWARDED.ALL AVERAGE H.HCG.AWARDED.ALL NO.NULLS 
  \   
  008: TOTAL EVAL "IF(H.CS.ADM.EST.NEED = 'Incomplete')THEN COUNTER ELSE 
  0"  
  \    
  009: TOTAL (INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED 
  ,'Incomplete',1)) 
  \  
  010: HEADER "'C' Financial Aid stats'LL''TC''LL'" ID.SUP 
  DET.SUPAt 02:50 PM 2/5/2004 -0500, you wrote:
  It's hard to help without seeing your error msgs.  The [1] means 
the last byte of FIELD.NAME.  If any byte could contain "*" then 
perhaps (INDEX(FIELD.NAME,'*',1) OR INDEX(FIELD.NAME,'Incomplete',1)) would 
work.  This should work in UNIQUERY.  I tried in on UniVerse and 
it works and should work on UniData. 

  -Original Message- 
  From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, February 05, 2004 12:16 PM 
  To: U2 Users Discussion List 
  Subject: RE: EVAL and LIKE
  I tried it. It didn't seem to work but maybe I didn't do it right. I 
  did include the [1] in there. I'm a newbie, was I not suppose to. I'm also 
  running this in a UNIQUERY statement at the colon prompt. Would that have 
  anything to do with it not running properly. Thanks for whatever light you 
  can shed on my case.
  kevin
  At 11:24 AM 2/5/2004 -0500, you wrote:
  
Perhaps this will help: 
  
EVAL "IF (FIELD.NAME[1] = "*" OR INDEX(FIELD.NAME,'Incomplete',1)) 
THEN 1 ELSE 0" 
-Original Message- 
From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 05, 2004 11:14 AM 
To: [EMAIL PROTECTED] 
Subject: EVAL and LIKE
I'm trying to get this statement to work: 
Basically I'm trying to count the number of records that have a 
FIELD.NAME that has an "*" or an "Incomplete".
TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN 
COUNTER ELSE 0" 
Thanks for any assistance.
Kevin -- u2-users mailing 
list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users-- 
  u2-users mailing list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users
  
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Ken Wallis
on Thursday, February 05, 2004 12:16 PM Kevin Michaelsen wrote::

>I inserted your suggestion in line 9 This time I include
>my full paragraph and the error message that comes up is a syntax
>error.

[snip]
>009: TOTAL (INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED
,'Incomplete',1)) \

You are missing the EVAL introducer here.  should be:

TOTAL EVAL "(INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED
,'Incomplete',1))" \

Though I suspect that wouldn't actually do what you want because the INDEX
function returns an offset, not just 1 or zero.  You'll have to make the
EVAL statement more complex with some IF statements.

>At 02:50 PM 2/5/2004 -0500, Stu Glancy wrote:

>>It's hard to help without seeing your error msgs.  The [1] means the
>>last byte of FIELD.NAME.  If any byte could contain "*" then perhaps
>>(INDEX(FIELD.NAME,'*',1) OR INDEX(FIELD.NAME,'Incomplete',1)) would
>>work.  This should work in UNIQUERY.  I tried in on UniVerse and it
>>works and should work on UniData.

Substring extraction with the [[n],m] notation works in UniVerse I-Types,
but DOESN'T work in UniData virtual fields.  You have to use a function
(SUBSTRINGS()?).

Cheers,

Ken


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Kevin Michaelsen

Stu and everyone else,
Thanks for sticking with me but I'm going to  ask you to take a look
one more time. I inserted your suggestion in line 9 This time I include
my full paragraph and the error message that comes up is a syntax error.
Anyone else reading please feel free to contribute. Many thanks for any
thoughts.
kevin
001: PA RUNS FIN AID
STATS 

002: LIST CS.2004
\

003: WITH H.CS.APPL.START.TERM =
'04/FA'\  

004: WITH H.CS.ACCEPTS = Y
\   

005: BY H.CS.APPL.ADMIT.STATUS BREAK.ON H.CS.APPL.ADMIT.STATUS
\   

006: TOTAL COUNTER TOTAL EVAL "IF(H.HCG.AWARDED.ALL>
 0) THEN COUNTER ELSE 0" FMT '5' COL.HDG "W/HCG"
\ 

007: TOTAL H.HCG.AWARDED.ALL AVERAGE H.HCG.AWARDED.ALL NO.NULLS
\  

008: TOTAL EVAL "IF(H.CS.ADM.EST.NEED = 'Incomplete')THEN COUNTER
ELSE 0" 
\   

009: TOTAL (INDEX(H.CS.ADM.EST.NEED ,'*',1) OR INDEX(H.CS.ADM.EST.NEED
,'Incompl
ete',1))
\ 

010: HEADER "'C' Financial Aid stats'LL''TC''LL'" ID.SUP
DET.SUP

At 02:50 PM 2/5/2004 -0500, you wrote:
It's
hard to help without seeing your error msgs.  The [1] means the last
byte of FIELD.NAME.  If any byte could contain "*" then
perhaps (INDEX(FIELD.NAME,'*',1) OR INDEX(FIELD.NAME,'Incomplete',1))
would work.  This should work in UNIQUERY.  I tried in on
UniVerse and it works and should work on UniData.

-Original Message-
From: Kevin Michaelsen
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 05, 2004 12:16 PM
To: U2 Users Discussion List
Subject: RE: EVAL and LIKE

I tried it. It didn't seem to work but maybe I didn't do it right. I
did include the [1] in there. I'm a newbie, was I not suppose to. I'm
also running this in a UNIQUERY statement at the colon prompt. Would that
have anything to do with it not running properly. Thanks for whatever
light you can shed on my case.

kevin

At 11:24 AM 2/5/2004 -0500, you
wrote:
Perhaps this will help:
 
EVAL "IF (FIELD.NAME[1] = "*" OR
INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 0"

-Original Message- 
From: Kevin Michaelsen
[mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 05, 2004 11:14 AM 
To: [EMAIL PROTECTED] 
Subject: EVAL and LIKE

I'm trying to get this statement to work: 
Basically I'm trying to count the number of records that have a
FIELD.NAME that has an "*" or an
"Incomplete".

TOTAL EVAL "IF(WITH FIELD.NAME LIKE
"'...*','Incomplete'") THEN COUNTER ELSE 0" 

Thanks for any assistance.

Kevin
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Stu Glancy



It's 
hard to help without seeing your error msgs.  The [1] means the last byte 
of FIELD.NAME.  If any byte could contain "*" then perhaps 
(INDEX(FIELD.NAME,'*',1) OR INDEX(FIELD.NAME,'Incomplete',1)) would work.  
This should work in UNIQUERY.  I tried in on UniVerse and it works and 
should work on UniData.

  -Original Message-From: Kevin Michaelsen 
  [mailto:[EMAIL PROTECTED]Sent: Thursday, February 05, 2004 
  12:16 PMTo: U2 Users Discussion ListSubject: RE: EVAL 
  and LIKEI tried it. It didn't seem to work but maybe I 
  didn't do it right. I did include the [1] in there. I'm a newbie, was I not 
  suppose to. I'm also running this in a UNIQUERY statement at the colon prompt. 
  Would that have anything to do with it not running properly. Thanks for 
  whatever light you can shed on my case.kevinAt 11:24 AM 
  2/5/2004 -0500, you wrote:
  Perhaps this will help: EVAL "IF (FIELD.NAME[1] = "*" OR 
INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 0" 

  -Original Message- 
  From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, February 05, 2004 11:14 AM 
  To: [EMAIL PROTECTED] 
  Subject: EVAL and LIKE
  I'm trying to get this statement to work: 
  Basically I'm trying to count the number of records that have a 
  FIELD.NAME that has an "*" or an "Incomplete".
  TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN 
  COUNTER ELSE 0" 
  Thanks for any assistance.
  Kevin-- u2-users mailing 
list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Kevin Michaelsen

Thanks for your help. I'm actually trying to use it in a summary report
that has many more EVAL statements so the count FILE thing won't work.
I'm still working to see if I can still use the EVAL command and the LIKE
selection. Any feedback related to that would be appreciated.
kevin

At 10:29 AM 2/5/2004 -0700, you wrote:
If
all you need is just a count of records in a file with a particular field
containing the value "*" or 
"Incomplete":
 
COUNT file WITH
field = '*' 'Incomplete'

-Original Message-
From: Kevin Michaelsen
[mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 05, 2004 10:16 AM
To: U2 Users Discussion List
Subject: RE: EVAL and LIKE

I tried it. It didn't seem to work but maybe I didn't do it right. I
did include the [1] in there. I'm a newbie, was I not suppose to. I'm
also running this in a UNIQUERY statement at the colon prompt. Would that
have anything to do with it not running properly. Thanks for whatever
light you can shed on my case.

kevin

At 11:24 AM 2/5/2004 -0500, you
wrote:
Perhaps this will help:
 
EVAL "IF (FIELD.NAME[1] = "*" OR
INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 0"

-Original Message- 
From: Kevin Michaelsen
[mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 05, 2004 11:14 AM 
To: [EMAIL PROTECTED] 
Subject: EVAL and LIKE

I'm trying to get this statement to work: 
Basically I'm trying to count the number of records that have a
FIELD.NAME that has an "*" or an
"Incomplete".

TOTAL EVAL "IF(WITH FIELD.NAME LIKE
"'...*','Incomplete'") THEN COUNTER ELSE 0" 

Thanks for any assistance.

Kevin
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Harold . Oaks
Title: Message



Kevin:
 
A problem is the use 
of the double-quote more than once - this will fail.  Also, in your 
original below you have the following clause using LIKE:
 
LIKE "'...*' 
which will not work in the way you 
want.  Because the  ...* is within the single quotes, 
the LIKE statement will try to match on exactly that - it will seek fields that 
are exactly three periods and an asterisk!   Actually, if 
you just want to count records, try this
 
COUNT FILE.NAME WITH FIELD.NAME LIKE "...'*'..." OR 
WITH FIELD.NAME LIKE 
"...'Incomplete'..."
Note that the specific strings you want to seek are inside 
the single quotes, but the triple-dots are outside those but contained inside 
the double quotes.  (In pi/open you don't need the double quotes at 
all).
 
Harold Oaks
Sr. Analyst/Programmer
Clark County, WA

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
  Of Kevin MichaelsenSent: Thursday, February 05, 2004 9:16 
  AMTo: U2 Users Discussion ListSubject: RE: EVAL and 
  LIKEI tried it. It didn't seem to work but maybe I didn't 
  do it right. I did include the [1] in there. I'm a newbie, was I not suppose 
  to. I'm also running this in a UNIQUERY statement at the colon prompt. Would 
  that have anything to do with it not running properly. Thanks for whatever 
  light you can shed on my case.kevinAt 11:24 AM 2/5/2004 -0500, 
  you wrote:
  Perhaps this will help: EVAL "IF (FIELD.NAME[1] = "*" OR 
INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 0" 

  -Original Message- 
  From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, February 05, 2004 11:14 AM 
  To: [EMAIL PROTECTED] 
  Subject: EVAL and LIKE
  I'm trying to get this statement to work: 
  Basically I'm trying to count the number of records that have a 
  FIELD.NAME that has an "*" or an "Incomplete".
  TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN 
  COUNTER ELSE 0" 
  Thanks for any assistance.
  Kevin-- u2-users mailing 
list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Shawn Waldie
Title: Message



If all 
you need is just a count of records in a file with a particular field 
containing the value "*" or "Incomplete":
 
COUNT file WITH field = '*' 'Incomplete'

  
  -Original Message-From: Kevin Michaelsen 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 
  10:16 AMTo: U2 Users Discussion ListSubject: RE: EVAL 
  and LIKEI tried it. It didn't seem to work but maybe I 
  didn't do it right. I did include the [1] in there. I'm a newbie, was I not 
  suppose to. I'm also running this in a UNIQUERY statement at the colon prompt. 
  Would that have anything to do with it not running properly. Thanks for 
  whatever light you can shed on my case.kevinAt 11:24 AM 
  2/5/2004 -0500, you wrote:
  Perhaps this will help: EVAL "IF (FIELD.NAME[1] = "*" OR 
INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 0" 

  -Original Message- 
  From: Kevin Michaelsen [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, February 05, 2004 11:14 AM 
  To: [EMAIL PROTECTED] 
  Subject: EVAL and LIKE
  I'm trying to get this statement to work: 
  Basically I'm trying to count the number of records that have a 
  FIELD.NAME that has an "*" or an "Incomplete".
  TOTAL EVAL "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN 
  COUNTER ELSE 0" 
  Thanks for any assistance.
  Kevin-- u2-users mailing 
list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Kevin Michaelsen

I tried it. It didn't seem to work but maybe I didn't do it right. I did
include the [1] in there. I'm a newbie, was I not suppose to. I'm also
running this in a UNIQUERY statement at the colon prompt. Would that have
anything to do with it not running properly. Thanks for whatever light
you can shed on my case.
kevin
At 11:24 AM 2/5/2004 -0500, you wrote:
Perhaps
this will help:
 
EVAL "IF (FIELD.NAME[1] =
"*" OR INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE
0"

-Original Message-
From: Kevin Michaelsen
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 05, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: EVAL and LIKE

I'm trying to get this statement to work:
Basically I'm trying to count the number of records that have a
FIELD.NAME that has an "*" or an
"Incomplete".

TOTAL EVAL "IF(WITH FIELD.NAME LIKE
"'...*','Incomplete'") THEN COUNTER ELSE 0" 

Thanks for any assistance.

Kevin

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: EVAL and LIKE

2004-02-05 Thread Stu Glancy



Perhaps this will help:
 
EVAL 
"IF (FIELD.NAME[1] = "*" OR INDEX(FIELD.NAME,'Incomplete',1)) THEN 1 ELSE 
0"

  -Original Message-From: Kevin Michaelsen 
  [mailto:[EMAIL PROTECTED]Sent: Thursday, February 05, 2004 
  11:14 AMTo: [EMAIL PROTECTED]Subject: EVAL and 
  LIKEI'm trying to get 
  this statement to work:Basically I'm trying to count the number of records 
  that have a FIELD.NAME that has an "*" or an "Incomplete".TOTAL EVAL 
  "IF(WITH FIELD.NAME LIKE "'...*','Incomplete'") THEN COUNTER ELSE 0" 
  Thanks for any 
assistance.Kevin
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users