[Download-List] Unexpected Field Value

Patrick O'Neal poneal at westinautomotive.com
Tue Jul 26 14:19:55 EDT 2005


Hi Group,
 
(Avante 9.2.5f, Unidata 6.0, SB+ 5.2.4)
 
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.
 
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.
 
For those of you with Avante, the commands I was working with were:
 
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)
 
DOWNLOAD ICEDETHST BREAK.ON ITEM_NBR TOTAL ODBC_SHIPPED_QTY DET.SUP
 
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?
 
Thanks,
 
Pat O'Neal
Senior Programmer/Analyst
Westin Automotive Products, Inc.
(626) 960-6762 x439
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.cedarville.edu/pipermail/download-list/attachments/20050726/79eb0ba2/attachment.html>


More information about the download-list mailing list