# outer.s
outer.join_function (A,B,AKEY=1,BKEY=1)
{
# A,B are input matrices
# AKEY, BKEY are the positions of the key column in A and B
# result is a matrix
# f (matrix) = records present in either a or b
acols_dim(A)[2]
bcols_dim(B)[2]
f1_sort( unique ( c ( A[,AKEY],B[,BKEY]) ) )
frows_length(f1)
fcols_acols+bcols-1
alocinf_match(A[,AKEY],f1)
blocinf_match(B[,BKEY],f1)
f_matrix(NA,frows,fcols)
f[,1]_f1
flast_1
fnext_flast+1
flast_fnext+acols-2
f[alocinf,fnext:flast]_A[,-AKEY]
fnext_flast+1
flast_fnext+acols-2
f[blocinf,fnext:flast]_B[,-BKEY]
f
}

