× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,
      I have a program that reads selected customers (RCM) then reads all
the invoice lines (SIL) for a time period for each customer. I am picking
up the correct customers, but not getting any invoice lines. I have checked
and the first couple of customers had no invoices in Jan, but others do. Do
I need to reset the invoice file to the beginning for each customer? I have
never done that before, but I keep getting SQL code 100 (end of file). Here
is my code:

0093.00 C******************************
0094.00 C/EXEC SQL DECLARE A CURSOR FOR
0095.00 C+ SELECT CCUST,CMFF01 FROM RCM WHERE CMFF01 <> :Blk16
0096.00 C+ ORDER BY CMFF01,CCUST
0097.00 C/END-EXEC
0098.00 C******************************
0099.00 C/EXEC SQL
0100.00 C+    OPEN A
0101.00 C/END-EXEC
0102.00 C******************************
0109.00 C/EXEC SQL DECLARE B CURSOR FOR
0110.00 C+ SELECT
0111.00 C+ ILINVN,ILLINE,ILPROD,ILCUST,ILQTY,ILDATE,ILNET,ILCLAS,ILLTYP
0112.00 C+  FROM SIL WHERE ILCUST = :CUSTNO and ILDATE >= :DteBeg and
0113.00 C+  ILDATE <= :DteEnd ORDER BY ILDATE
0114.00 C/END-EXEC
0115.00 C******************************
0116.00 C/EXEC SQL
0117.00 C+    OPEN B
0118.00 C/END-EXEC
0119.00 C******************************
0120.00 C*
0121.00 C                   EVAL      MorRCM = 'YES'
0122.00 C*
0123.00 C                   DOU       MorRCM = 'NO '
0124.00 C*
0125.00 C/EXEC SQL
0126.00 C+ FETCH NEXT FROM A INTO :RCMRec
0127.00 C/END-EXEC
0128.00 C*
0129.00 C                   IF        SQLCOD <> 0
0130.00 C                   EVAL      MorRCM = 'NO '
0131.00 C                   ELSE
0132.00 C                   EVAL      CustNo = CCUST
0134.00 C                   EVAL      CusId = CMFF01
0135.00 C                   EVAL      MorSIL = 'YES'
0136.00 C*
0137.00 C                   DOU       MorSIL = 'NO '
0138.00 C*
0139.00 C/EXEC SQL
0140.00 C+ FETCH NEXT FROM B INTO :SILMPG
0141.00 C/END-EXEC
0142.00 C*
0143.00 C                   IF        SQLCOD <> 0

More code.....

This last SQLCOD = 100

Any ideas?

<===================================================>

Terri Harteau
Felker Brothers Corporation
Marshfield, WI
****************
"There's no point in being grown up if you can't be childish sometimes."
- Dr. Who
****************







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.