Hello

Pl Help me with this simple solution
I want to merge two files How can i do it ?

VB Code:
  1. OPEN "ADD.DAT" FOR INPUT AS#1
  2. DO UNTIL EOF(1)
  3. i% =i% + 1
  4. if i% > ubound(Names$) then redim preserve Names$(1 to i%)
  5. if i% > ubound(goals$) then redim preserve add$(1 to i%)
  6.  
  7. INPUT #1, Name$(i%), add$(i%)
  8. LOOP
  9. CLOSE #1

Which displays
"Ronaldo","Brazil"
"David","UK"
"Pele","Brazil"
"Mardona","Argentina"
"Doanald","SA"
"Schnider","Germany"


VB Code:
  1. OPEN "Goals.Dat" FOR INPUT AS#1
  2. DO UNTIL EOF(1)
  3. s$=s%+1
  4. if s% > ubound(Names$) then redim preserve Names$(1 to s%)
  5. if s% > ubound(goals$) then redim preserve goals$(1 to s%)
  6. INPUT #1, Names$(i%), goals$(i%)
  7. LOOP
  8. CLOSE #1

Which displays
"Ronaldo","10"
"David","4"
"Doanald","3"
"Schnider","2"

I want to merge above two files and get the result as
"Ronaldo","Brazil","10"
"David","UK","4"
"Pele","Brazil",""
"Mardona","Argentina",""
"Doanald","SA","3"
"Schnider","Germany","2"

Pl Help

Regards

Samyo





i% = 0

for i% = 0 to ubound(Name$)
FullGreeting$(i%) = Greeting$(i%) & ", " & Name$(i%)
next i