I am using the following code to replace Data from Trial.DBF to Banks.dbf.
But it seems that DO-ENDDO is not working for all all the records from Top to bottom.
I am not able to replace data for Banks.accode=120616 and banks.bankcode=09. Whenever I execute the below procedure, the above heads are not updated.
Where I am Going wrong, Kindly Guide.
*****CODE STARTS HERE************
Mmonth=1
Select 7
Use Banks
Select 6
Use Trial
select 7
goto top
DO while (!EOF())
bank_code= banks.bankcode
bank_head= banks.accode
select 6
locate for bank_code = trial.bankcode .AND. bank_head = ;
trial.accode
If (!Found())
select 7
Append Blank
Replace Banks.bankcode with bank_code
Replace Banks.accode with bank_head
ENDIF
Select 6
do case
case mmonth == 4
newob= trial.debit_4
case mmonth == 5
newob= trial.debit_5
case mmonth == 6
newob= trial.debit_6
case mmonth == 7
newob= trial.debit_7
case mmonth == 8
newob= trial.debit_8
case mmonth == 9
newob= trial.debit_9
case mmonth == 10
newob= trial.debit_10
case mmonth == 11
newob= trial.debit_11
case mmonth == 12
newob= trial.debit_12
case mmonth == 1
newob= trial.debit_1
case mmonth == 2
newob= trial.debit_2
case mmonth == 3
newob= trial.debit_3
case mmonth == 13
newob= trial.debit_31
case mmonth == 14
newob= trial.debit_32
ENDCASE
WAIT WINDOW bank_code
WAIT WINDOW Bank_head
WAIT WINDOW Newob
select 7
replace banks.ob with newob
select 7
skip
enddo
***CODE ENDS HERE********
Both the above DBF can be downloaded from
https://www.dropbox.com/s/7reelvvjuix9k9u/DBF.zip?m
Harsh