Something like this?
while (ind '= ""){
set row = ^CacheTemp(repid,"MAIN",ind)
if row [ "keyword" {
use filemain write row,!
} else {
use filemain2 write row,!
}
; Get next row index for MAIN report
set ind = $order(^CacheTemp(repid,"MAIN",ind))
}
close filemain- Log in to post comments