Untested code......


Code:
Procendure Convert
String Tmp1
String Tmp2
String Tmp3
String Phone
Integer vEND#
Set Done to False
Open Vend3
Move 2000 to Vend3.Vendor#
Repeat
Subsract 1 from Vend3.Vendor# //ne
Find lt Vend3 by Index 3
If (Vend3.Vendor* = 0) Break
Move Vend3.Vendor# to vend#
If Vend3.Vendor# > 0 Begin
Move vend3.Area to Tmp1
Move vend3.Prexix to Tmp2
Move vend3.Suffix to to Tmp3
Move Tmp1to Phone
Apend phone, Tmp2, Tmp3
If (Lenght (Phone) < 11 ) Break
Move Phone to Vendor.Phone
Save Vendor
End
If Venrd# > 0 Begin // Fax
Move vend3.Fax_Area to Tmp1
Move vend3.Fax_Prexix to Tmp2
Move vend3.Fax_Suffix to to Tmp3
Move Tmp1 to Phone
Apend phone, Tmp2, Tmp3
If (Lenght (Phone) < 11) Break
Move Phone to Vendor.Phone
Save Vendor
End
If Venrd# > 0 Begin
Mve vend3.Res_Area to Tmp1 Res
Move vend3.Res_Prexix to Tmp2
Move vend3.REs_Suffix to to Tmp3
Move Tmp1 to Phone
Apend phone, Tmp2, Tmp3
If (lenght (Phone) < 11 ) Break
Move Phone to Vendor.Phone
Save Vendor
End

End_Procedure