Process: ASCII Loaded Twice
Posted: Tue Dec 30, 2008 7:14 pm
Very odd occurrence.
I have a chore that is a simple process that loads an ASCII file. It has been running for 20+ days perfectly. Then it botched the job, by loading the ASCII file two times. I reviewed the logs and the process was only executed one time. I didn't find anything wrong, and could not duplicate the error. Ran fine for a few more days and messed up again today!
I can only guess that the data tab is somehow being executed two time, but can't think of any reason why or how. Anyone else have any thoughts?
Prolog:
Meta:
Data:
I have a chore that is a simple process that loads an ASCII file. It has been running for 20+ days perfectly. Then it botched the job, by loading the ASCII file two times. I reviewed the logs and the process was only executed one time. I didn't find anything wrong, and could not duplicate the error. Ran fine for a few more days and messed up again today!

I can only guess that the data tab is somehow being executed two time, but can't think of any reason why or how. Anyone else have any thoughts?
Prolog:
Code: Select all
Record_Count=0;
Code: Select all
Day_v='';
Month_v='';
PPC_Rebate_n=0;
Units_n=0;
Standard_Cost_n=0;
Month_v=SubST(Posting_Date,1,2);
Day_v=SubST(Posting_Date,4,2);
PPC_Rebate_n=IF(SUBST(PPC_Rebate,LONG(PPC_Rebate),1)@='-',-NUMBR(SUBST(PPC_Rebate,1,LONG(PPC_Rebate)-1)),NUMBR(PPC_Rebate));
Units_n=IF(SUBST(Units,LONG(Units),1)@='-',-NUMBR(SUBST(Units,1,LONG(Units)-1)),NUMBR(Units));
Standard_Cost_n=IF(SUBST(Standard_Cost,LONG(Standard_Cost),1)@='-',-NUMBR(SUBST(Standard_Cost,1,LONG(Standard_Cost)-1)),NUMBR(Standard_Cost));
Data:
Code: Select all
Day_v='';
Month_v='';
PPC_Rebate_n=0;
Units_n=0;
Standard_Cost_n=0;
Record_Count=Record_Count + 1;
IF(Material_Number@='721566-04');
ItemSkip;
ELSEIF(Material_Number@='8000360');
ItemSkip;
ENDIF;
Month_v=SubST(Posting_Date,1,2);
Day_v=SubST(Posting_Date,4,2);
PPC_Rebate_n=IF(SUBST(PPC_Rebate,LONG(PPC_Rebate),1)@='-',-NUMBR(SUBST(PPC_Rebate,1,LONG(PPC_Rebate)-1)),NUMBR(PPC_Rebate));
Units_n=IF(SUBST(Units,LONG(Units),1)@='-',-NUMBR(SUBST(Units,1,LONG(Units)-1)),NUMBR(Units));
Standard_Cost_n=IF(SUBST(Standard_Cost,LONG(Standard_Cost),1)@='-',NUMBR(SUBST(Standard_Cost,1,LONG(Standard_Cost)-1)),-NUMBR(Standard_Cost));
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Wholesale') + Wholesale,'Daily Sales',Trim(Material_Number),Compan
y_Code,Month_v,Day_v,'Wholesale');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Hospital') + Hospital,'Daily Sales',Trim(Material_Number),Company_
Code,Month_v,Day_v,'Hospital');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Contract') + Contract,'Daily Sales',Trim(Material_Number),Company_
Code,Month_v,Day_v,'Contract');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Misc') + Miscellaneous,'Daily Sales',Trim(Material_Number),Company
_Code,Month_v,Day_v,'Misc');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Chargeback') + (Chargeback*-1),'Daily Sales',Trim(Material_Number)
,Company_Code,Month_v,Day_v,'Chargeback');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Cash Discount') + (Cash_Discount*-1),'Daily Sales',Trim(Material_N
umber),Company_Code,Month_v,Day_v,'Cash Discount');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Rebate') + (Rebate*-1),'Daily Sales',Trim(Material_Number),Company
_Code,Month_v,Day_v,'Rebate');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Return') + (Return*-1),'Daily Sales',Trim(Material_Number),Company
_Code,Month_v,Day_v,'Return');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'PPC Rebate') + (PPC_Rebate_n),'Daily Sales',Trim(Material_Number),
Company_Code,Month_v,Day_v,'PPC Rebate');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'Units') + Units_n,'Daily Sales',Trim(Material_Number),Company_Code
,Month_v,Day_v,'Units');
CellPutN(CellGetN('Daily Sales',Trim(Material_Number),Company_Code,Month_v,Day_v,'COGS') + Standard_Cost_n,'Daily Sales',Trim(Material_Number),Compa
ny_Code,Month_v,Day_v,'COGS');