<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=024072119-31052011><FONT color=#0000ff 
size=2 face=Arial>I got it to work!!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=024072119-31052011><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=024072119-31052011><FONT color=#0000ff 
size=2 face=Arial>thanks for all your help!</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face="Californian FB">Barb</FONT></SPAN> </P>
<DIV>&nbsp;</DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> o.kappert@qc.aibn.com 
[mailto:o.kappert@qc.aibn.com] <BR><B>Sent:</B> Tuesday, May 31, 2011 10:19 
AM<BR><B>Cc:</B> Zanotelli, Barb; powerh-l@lists.sowder.com<BR><B>Subject:</B> 
Re: Powerhouse dictionary not matching Image<BR></FONT><BR></DIV>
<DIV></DIV>Query is rather smart / dumb depending on how you look at it.&nbsp; 
The <BR><PRE wrap="">f SL-DATE-TIME=201104282400

statement uses the actual value as if it were character.  It then converts the value into the same representation the item is.  This usually results in the correct equate and therefore it found the record.

Now for Powerhouse,  the date-time numeric value might be converted to a float value and then compared.  It is very unlikely that the float value is the same as the item value and therefore the record will not be found.  Define a string with the value and then convert it to the same representation as the item value.

Olav.
</PRE><BR>Pickering, John (NORBORD) wrote: 
<BLOCKQUOTE cite=mid50E1B910B1BCC14BA5A7360CD062EBB803069E@torexc251.norbord.com 
type="cite"><PRE wrap="">I try never to use NUMERIC. Powerhouse will use floating point storage
for this and there always seems to be some corner case where it won't
work :( Try to use ZONED or INTEGER.

How about if you try 
  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">access ddcl01
report sl-date-time pic "^^^^^^^^^^^^" signif 12
go
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->Just to see what is really in that field.

-----Original Message-----
From: <A class=moz-txt-link-abbreviated href="mailto:powerh-l-bounces+john.pickering=norbord.com@lists.sowder.com">powerh-l-bounces+john.pickering=norbord.com@lists.sowder.com</A>
[<A class=moz-txt-link-freetext href="mailto:powerh-l-bounces+john.pickering=norbord.com@lists.sowder.com">mailto:powerh-l-bounces+john.pickering=norbord.com@lists.sowder.com</A>] On
Behalf Of Zanotelli, Barb
Sent: Tuesday, May 31, 2011 10:39 AM
To: Bob Deskin
Cc: <A class=moz-txt-link-abbreviated href="mailto:powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com">powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com</A>;
<A class=moz-txt-link-abbreviated href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</A>
Subject: RE: Powerhouse dictionary not matching Image

I know there is data for 201104282400, I can see it in query.
  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">b=imcl01.rec
s=ddcl01
f SL-DATE-TIME=201104282400
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->31  ENTRIES QUALIFIED
  </PRE><PRE wrap=""><!---->This is my selection:
 
    ACCESS DDCL01
         
    DEFINE B-DATE CHAR*8 = PARM PROMPT "ENTER BEGIN DATE (CCYYMMDD): "
    DEFINE E-DATE CHAR*8 = PARM PROMPT "ENTER END DATE (CCYYMMDD): "
    DEFINE FULL-B CHAR*12 = PACK(B-DATE + "2400")
    DEFINE FULL-E CHAR*12 = PACK(E-DATE + "2400")
    DEFINE INT-B NUM*12 = NCONVERT(B-DATE)
    DEFINE INT-E NUM*12 = NCONVERT(E-DATE)
      
    ;SELECT IF SL-DATE-TIME &gt;= INT-B &amp;
    ;     AND SL-DATE-TIME &lt;= INT-E &amp;
    SELECT IF SL-DATE-TIME &gt;= 201104282400000000 &amp;
          AND SL-DATE-TIME &lt;= 201104282400000000 &amp;
          AND TRAN-FLAG &lt;&gt; "DL" AND TRAN-FLAG &lt;&gt; "CL"

As you can see I started out prompting for the dates and adding the time
at the end.  When that didn't work I put in the actual date just to see
what was and was not working.
I tried add 0's at the end but that produced nothing also.

It was also suggested to try the dateextract function but that was not
successful either.  

thanks

Barb

-----Original Message-----
From: Bob Deskin [<A class=moz-txt-link-freetext href="mailto:Bob.Deskin@ca.ibm.com">mailto:Bob.Deskin@ca.ibm.com</A>] 
Sent: Friday, May 27, 2011 1:34 PM
To: Zanotelli, Barb
Cc: <A class=moz-txt-link-abbreviated href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</A>;
<A class=moz-txt-link-abbreviated href="mailto:powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com">powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com</A>
Subject: Re: Powerhouse dictionary not matching Image


I wonder if you could be running into floating point issues. PowerHouse
does most expression processing using floating point. In the example you
gave us, which specific value can you find? Are you using SELECT IF
SL-DATE-TIME = &lt;value&gt;? And what values are available between the two
values you have in your example.

Bob



From:   "Zanotelli, Barb" <A class=moz-txt-link-rfc2396E href="mailto:BarbZ@millercompressing.com">&lt;BarbZ@millercompressing.com&gt;</A>
To:     <A class=moz-txt-link-rfc2396E href="mailto:powerh-l@lists.sowder.com">&lt;powerh-l@lists.sowder.com&gt;</A>
Date:   2011-05-27 01:34 PM
Subject:        Powerhouse dictionary not matching Image
Sent by:        <A class=moz-txt-link-abbreviated href="mailto:powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com">powerh-l-bounces+bob.deskin=ca.ibm.com@lists.sowder.com</A>



Hello listers 
I have an image database that was defined in the Powerhouse dictionary
way 
back when the dictionary was defined.  I tried to do a Quiz select with 
the main search item but It would never get any results even though I 
could see what it should have found in Query. Obviously we have no 
Powerhouse programs accessing this database.   I tried various ways of 
selecting and have narrowed it down to the fact that it will select a 
specific number (a date in this case) but will not when I do &gt;= or &lt;= as

in "select if sl-date-time&gt;= 201104282400 and sl-date-time&lt;= 
201104302400". The dictionary element is defined as:
  Element SL-DATE-TIME &amp; 
    Numeric Size 012 &amp; 
    Leading Sign " " &amp; 
    Picture "^^^^^^^^^^^^" 
And the in the dataset it is defined as: 
    Item SL-DATE-TIME     Datatype Integer Signed   Size 8 
Image refers to it as an I4. Powerhouse version is 8.19.c2. 
Any ideas will be greatly appreciated! 

Barb -- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =

  </PRE></BLOCKQUOTE></BODY></HTML>