Originally posted by Rob Parnell
I am trying to add an OBX to the beginning but it seems to always over write what is in OBX 0. Here is my code. I can write it in tcl but trying to use the Xlate
{ { OP COPY }
{ ERR 0 }
{ IN =0 }
{ OUT {{$%l1}} }
}
{ { OP COPY }
{ ERR 0 }
{ IN {{=This is a final Report}} }
{ OUT {{1(0).1(0).1(%l1).OBX(0).#5(0).[0]}} }
}
{ { OP ITERATE }
{ BASIS 1(0).1(0).1 }
{ VAR %g1 }
{ TYPE group }
{ BODY {
{ { OP COPY }
{ ERR 0 }
{ IN 1(0).1(0).1(%g1).OBX(0).#1(0) }
{ OUT 1(0).1(0).1(%l1).OBX(0).#1(0) }
}
{ { OP ADD }
{ ERR 0 }
{ IN {{=1 $%l1}} }
{ OUT {{$%l1}} }
{ FUNCTION ADD }
}
Here is the result. First OBX gets overwritten and line number is 22 not one
1(0).1(0).0(0).OBR(0) : >|||4434|1^Consultation Report|||201309041101<
1(0).1(0).1(0).OBX(0) : >|22|TX|GDT||This is a final Report||||||F<
1(0).1(0).1(1).OBX(0) : >|2|TX|GDT|| ||||||F<
1(0).1(0).1(2).OBX(0) : >|3|TX|GDT||Testing a consultation report... 123||||||F<
Should be
1(0).1(0).0(0).OBR(0) : >|||4434|1^Consultation Report|||201309041101<
1(0).1(0).1(0).OBX(0) : >|0|TX|GDT||This is a final Report||||||F<
1(0).1(0).1(1).OBX(0) : >|1|TX|GDT||This report is for testing |||||F<
1(0).1(0).1(2).OBX(0) : >|2|TX|GDT|| ||||||F<
1(0).1(0).1(3).OBX(0) : >|3|TX|GDT||Testing a consultation report... 123||||||F<