I inherited an Xlate using a BULKCOPY (yuck).
I need only send INx grouping that are active insurances (IN1.13=NULL).
The code I inherited to suppress the inactive insurance groups is:
ITERATE Type: group, Basis: 5(0).0, Variable: %g1
IF 5(0).0(%g1).IN1(0).#13(0).[0] ne @null
PATHCOPY @null 5(0).0(%g1).IN1(0)
PATHCOPY @null 5(0).0(%g1).IN2(0)
PATHCOPY @null 5(0).0(%g1).IN3(0)
Running this code results in:
IN1 (nothing else in this segment – this is the INx group to be skipped over since IN1-13 <> NULL)
IN1|2|normal segment from this point, IN1-13 = NULL
IN2|2|normal segment from this point and is the IN2 that belongs to the IN1 immediately above
Without having to rewrite the XLATE and replace the BULKCOPY with COPY/PATHCOPY, what are my options for preventing the creation of the NULL IN1 segment? I understand that by skipping over IN1 segment groups with terminated insurances, my output may include IN1 segments with set IDs skipped over and not in sequence – sometimes this is not an issue for the downstream system.
Thanks in advance.