Check the definition of the EDII810JH4 file, especially the composition of the key. Also check the F spec to make sure the file is defined as keyed.
Denis Robitaille
Directeur Service technique TI
CASCADES INC.
412 Marie Victorin
Kingsey falls(QuÃbec) Canada J0A 1B0
T : 819 363-6130
F : 819 363-6155
Robert Rogerson <rogersonra@xxxxxxxxx> 6/1/2010 4:55 >>>
Okay, try as I might I can not find an explanation for this.
In my program I am check if an invoice and dunsnumber were passed into the
program. If so, then only one invoice is processed. Otherwise all
invoices are processed. The code I have is:
// If an invoice and duns number where passed to this program
// only process a single invoice
// otherwise process all invoice where processed = *blanks
If invoiceIn <> *blanks and
dunsnbrIn <> *blanks;
Setll (invoiceIn: dunsnbrIn) EDII810JH4;
rc = %Equal();
Reade (invoiceIn: dunsnbrIn) EDII810JH4;
rc = %Eof();
Else;
Setll *start EDII810JH4;
Read EDII810JH4;
Endif;
Dow not %Eof(EDII810JH4);
....Processing
If invoiceIn <> *blanks and
dunsnbrIn <> *blanks;
Reade (invoiceIn: dunsnbrIn) EDII810JH4;
Else;
Read EDII810JH4;
Endif;
Enddo;
I added the rc to check the values of %Equal() and %Eof() while in debug.
When I pass an invoice and dunsnumber from the file and debug the program
the %Equal() after the Setll has a value of '0' indicating an exact match
was not found. I check the file and yes the record does exist. I also
tested this with SQL adding the invoice number and dunsnumber passed to the
program and the record was returned.
I'm stumped...any ideas?
One more thing, if I change the key to only the invoice it works.
Setll invoiceIn EDII810JH4;
rc = %Equal();
Reade invoiceIn EDII810JH4;
Thanks all,
Rob
As an Amazon Associate we earn from qualifying purchases.