<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>Hi
Group,</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>(Avante 9.2.5f,
Unidata 6.0, SB+ 5.2.4)</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>I had occasion to
use DOWNLOAD yesterday; I was pulling shipped quantities from the ICEDETHST file
(Avante sales invoice history). There is a field definition in ICEDETHST
called ODBC_SHIPPED_QTY which is simply the quantity shipped multiplied by
either 1 or -1 depending on whether it was a regular sales invoice or a credit
memo. The sign is derived by calling a subroutine from the dictionary field
ODBC_SIGN. The subroutine looks at the invoice type and returns either "1" or
"-1". The ODBC_SHIPPED_QTY field then simply multiplies the Shipped Qty (record
attribute 2) times ODBC_SIGN.</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>I was extracting the
data summarized on part number and just wanted the net quantity per part. I
figured if I just totaled the ODBC_SHIPPED_QTY field, it should net debits to
credits. What was unexpected was that DOWNLOAD seems to lose the sign from the
ODBC_SHIPPED_QTY field; everything came back as a positive number. However, if I
included the ODBC_SIGN field itself, it came back as both positive and negative,
as it should have. Why do you suppose it would do that? Naturally, in order to
show the ODBC_SIGN field, I had to omit the DET.SUP keyword and show each detail
record.</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>For those of you
with Avante, the commands I was working with were:</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>SELECT ICEDETHST
WITH Z_INV_DATE = "07/25/05" BY ITEM_NBR (Z_INV_DATE is a derived
field that links to ICEHDRHST to get the Invoice Date)</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>DOWNLOAD ICEDETHST
BREAK.ON ITEM_NBR TOTAL ODBC_SHIPPED_QTY DET.SUP</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial size=2>Which should
produce one line per part number showing the total (net) shipped qty. The
UniQuery LIST command correctly shows the sign, but DOWNLOAD does not. Any
ideas?</FONT></SPAN></DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=265290118-26072005><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>Pat O'Neal</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Senior Programmer/Analyst</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Westin Automotive Products,
Inc.</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>(626) 960-6762 x439</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>