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-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-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

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 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 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 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 @RECORD16 * 0.9  @RECORD17 = 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 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 @RECORD16 * 0.9  @RECORD17 = 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 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 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 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 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 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 Michael D. Ballard
On UniVerse, the system seems to assume left-justified comparison unless 
you specify something different using FMT.  Try this:
SELECT ... WITH EVALF16 * 0.9 FMT10R  F17
You can also specify a conversion much the same way:
SELECT ... WITH EVALF16 * 0.9 CONVMD2 FMT10R  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 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 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 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 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 Shawn Waldie
Title: Message



If all 
you need is justa 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 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 exactlythree periods and an asterisk!Actually, if 
you just want to count records, try this

COUNTFILE.NAMEWITH FIELD.NAMELIKE "...'*'..." OR 
WITHFIELD.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/openyou 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