[Download-List] Unexpected Field Value

David L. Rotman rotmand at cedarville.edu
Mon Aug 1 09:49:38 EDT 2005


Pat--

Would you be able to share the definitions for ODBC_SHIPPED_QTY
and ODBC_SIGN?  I'd be glad to take a look at them.

This kind of problem in the past has been related to an underlying
subroutine changing the value of @ID or @RECORD but there could
be some other problem also.


>>> poneal at westinautomotive.com 7/26/2005 2:19:55 PM >>>
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
 

Dave Rotman
Director of Computer Services
Cedarville University
251 N. Main Street
Cedarville, OH 45314
rotmand at cedarville.edu
voice 937-766-7905
fax 937-766-8819





More information about the download-list mailing list