Export problem

Don Coleman dcoleman at dgcreact.com
Tue Jun 12 12:40:38 PDT 2007


I have the following export table.  In this sample I process 3 records which
I get, each containing 25 fields.  But in between each desired record I get
a records with 25 blank fields (file attached).  Anyone see the error?
As I said only 3 records are selected in this sample, yet I get 6 lines of
data.


Process table attached as well to retain formatting.



Jun 12, 2007  15:28           File Name: QS1DET                    Page   1
                             Processing: SQL_Export

   1 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: qu eq "1"
       Then: goto start
   2 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: qu(1,.0,g)="1"
   3 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: PUTENV "PFADDWP","OFF"
   4 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: QA(36,ALLUP,g)="E:\QS1\TODO\SQLImport\SQL_QS1DET.TXT"
   5 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
start    If: AB eq 10
       Then: goto begin
   6 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: lookup req = labelreq  k=10    i=A -nx
   7 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: not req
       Then: AA="";goto begin
   8 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: AA(30,ALLUP,g)=req(2);AB(4,ALLUP,g)=10
   9 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
begin    If: 
       Then: export ascii reads=(QA) r=\n f=~ o=" c=" -x
  10 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(1)=10;reads(2)=3;reads(3)=1;reads(4)=6
  11 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: lookup qs1  k=1    i=A -nx
  12 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: not qs1
       Then: end
  13 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then:
reads(6)=qs1(11);reads(7)=qs1(12);reads(8)=qs1(13);reads(9)=qs1(14)
             
  14 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then:
reads(10)=qs1(15);reads(11)=qs1(24);reads(12)=qs1(22);reads(13)=qs1
             (38)
  15 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then:
RA(1,ALLUP)=mid(qs1(40),"7","1");RB(8,MDY/)=mid(qs1(40),"1","6")
  16 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: RB ne qs1(37)
       Then: reads(14)="";goto count
  17 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: lookup exc = exclude  k=RA   i=A -nx
  18 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: not exc
       Then: reads(14)="";goto count







Jun 12, 2007  15:28           File Name: QS1DET                    Page   2
                             Processing: SQL_Export

  19 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(14)=RA
  20 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
count    If: 10 eq "MTSP" and 4 eq "JBP"
       Then: goto montana
  21 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: QM(9,*)=1{"5"
  22 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: lookup det = qs1det  k=QM   i=A -nx
  23 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
more     If: not det
       Then: goto skdet
  24 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 1 ne det(1)
       Then: goto skdet
  25 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: det(2) eq "5" and (det(3) eq @TD) and det(8) ne "Y" and det(7)
eq "
             "
       Then: QQ(10,.4)=(QQ+det(6));'Quantity shipped today
  26 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: getnext det;goto more
  27 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
skdet    If: 
       Then: reads(5)=QQ;'Quantity Shipped Today
  28 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(15)="0"
  29 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(16)="0"
  30 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: 'reads(16)=((25-(25-68))-QQ); 'Qty previously sent;'changed to
"0" 
             05/18/2007
  31 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: mid(qs1(50),"1","1") ne "U"
       Then: reads(17)=(qs1(25)-qs1(68));goto notupd; 'Quantity owed for
non-upd
             ate only's
  32 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: mid(qs1(50),"1","1") eq "U"
       Then: reads(17)="0"; 'Quantity owed for update only's
  33 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
notupd   If: 
       Then:
reads(18)=qs1(37);reads(19)=AA;reads(20)=qs1(27);reads(21)=qs1(43);
             reads(22)=9;reads(23)=""
  34 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 7 eq "V" or 7 eq "S" or 7 eq "C" or 7 eq "2"
       Then: reads(24)="N";reads(25)=7;11="Y";write;write reads;end
  35 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(24)="Y";reads(25)=7;11="Y";write;write reads;end
  36 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
montana  If: 
       Then:
reads(5)=qs1(68);reads(15)="0";reads(16)=(qs1(25)-qs1(68));reads(18
             )=qs1(37);reads(19)=AA




Jun 12, 2007  15:28           File Name: QS1DET                    Page   3
                             Processing: SQL_Export

  37 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(20)=qs1(27);reads(21)=qs1(43);reads(22)="";reads(23)=""
  38 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 7 eq "V" or 7 eq "S" or 7 eq "2" or 7 eq "C"
       Then: reads(24)="N";reads(25)=7;11="Y";write;write reads;end
  39 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 
       Then: reads(24)="Y";reads(25)=7;11="Y";write;write reads;end

Thank you,

Don Coleman
Donald G. Coleman, Consultant
402 Andrew Circle
Indiana, PA 15701
dcoleman at dgcreact.com
(724) 349-6302

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hardcopy.txt
Url: http://mailman.celestial.com/pipermail/filepro-list/attachments/20070612/63909511/attachment-0001.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SQL_QS1DET.TXT
Url: http://mailman.celestial.com/pipermail/filepro-list/attachments/20070612/63909511/attachment-0001.cc 


More information about the Filepro-list mailing list