Hey guys, forget the previous post, i have already loaded the data from the files to 4GL, now i need to compare them line by line and display both lines from both files if they differ in so much as a character, i have been trying a lot of stuff but i don't know if i am doing it right, here's an example of the code. So far i only get two lines on return from two very different files.
LOAD FROM 'file' INSERT INTO t_data
LOAD FROM 'file2' INSERT INTO t_data1
DECLARE cur1 CURSOR FOR select * from t_data
DECLARE cur2 CURSOR FOR select * from t_data1
let cntr=0
open cur1
open cur2
while(1)
fetch cur1 into m_dat
fetch cur2 into m_dat1
if status=notfound then
exit while
end if
let cntr=cntr+1
let arr_cols[cntr].mcol=m_dat clipped
let arr_cols1[cntr].mcol=m_dat1 clipped
IF arr_cols[cntr].mcol NOT LIKE arr_cols1[cntr].mcol THEN
display cntr,m_dat
display cntr,m_dat1
ELSE continue while
end if
end while
This is part of the code where i'm suppose to do the compare but it's too simple i think, i'm missing something very important but i cannot see what.
Thanks in advance.
trdin.