You could just replace all linefeed characters in &binvar with a simple loop:

var %x = 1
while ($bfind(&binvar,%x,10)) {
bcopy &binvar $calc(1+$v1) &binvar $v1 -1
bset &binvar $v1 13
%x = $v1 + 2
}