How to exclude segment groups if BULKCOPY is used?

Homepage Clovertech Forums Cloverleaf How to exclude segment groups if BULKCOPY is used?

  • Creator
    Topic
  • #118291
    DS Hunt
    Participant

    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.

Viewing 2 reply threads
  • Author
    Replies
    • #118292
      Jim Kosloskey
      Participant

      Change the Variant to make the IN1 segment in question to be Optional.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #118298
      DS Hunt
      Participant

      Thanks, Jim. Simple and elegant! Works like a champ. Never crossed my mind to mess with the “official” variant.

    • #118299
      Jim Kosloskey
      Participant

      Well I hope you have your own variant and have not modified the released variant.

      Obviously without BULKCOPY the solution could change.

       

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10