Skip/Suppress Segment

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Skip/Suppress Segment

  • Creator
    Topic
  • #52092
    Shelbi Engle
    Participant

      Hi,

      I have repeating PR1 segments, some which don’t contain complete data and the receiving system does not want the segment.

      I’m not having a problem with the iterate through the group or the IF statement, but how to tell it to skip the segment.

      How do I justify the skip after my IF statement?

      IF

      1(0).0(%g1).PR1(0).#2(0).[0]  eq =I9  &&  1(0).0(%g1).PR1(0).#5(0).[0]  eq @null

    Viewing 5 reply threads
    • Author
      Replies
      • #73034
        Russ Ross
        Participant

          I think you have several choices to accomplish skipping a segment within your xlate.

          If you use the logic you have as is then doing a @null pathcopy to the unwanted segment might have the desired outcome inside your skip if logic.

          An approach I have used and know will work is to not use bulkcopy and only do field by filed copy or segment by segment pathcopy for the items the receiving system is going to consume.

          To accomplish the second approach would require you to do something like this

          1(0).0(%g1).PR1(0).#2(0).[0]  ne =I9  &&  1(0).0(%g1).PR1(0).#5(0).[0]  ne @null

          A third approach might be to use an if/else statement similar to what you already have like

          1(0).0(%g1).PR1(0).#2(0).[0]  eq =I9  &&  1(0).0(%g1).PR1(0).#5(0).[0]  eq @null

          else

          In case you aren’t aware, there is a check box in my xlate configuration tool that allows me to acitvate the if/else and I have used it with success on prior work.

          Remeber I’m assuming you aren’t using bulkcopy which we don’t typically do anymore.

          If you are using bulkcopy then try using the copy @null to unwanted semgment to see if that works.

          Russ Ross
          RussRoss318@gmail.com

        • #73035
          Jim Kosloskey
          Participant

            Shelbi,

            How you do this will depend on whether or not you have BULKCOPY involved.

            Are you using BULKCOPY?

            Also when not sending a segment of a repeating group or segment set you need to make sure the receiving system is OK with the Set ID if it exists (usually the first field) being off since you are removing one.

            If you are using BULKCOPY then you need to use PATHCOPY COPYing @null to the segment. BULKCOPY already built all the segments on the destination side of your Xlate and now you need to remove the ones you don’t want (hopefully this group/segment is defined as optional in your variant – if not I suggest you kame it optional).

            If you are not using BULKCOPY, then I would change gthe operator of your IF from eq to ne and then do your Actions you want to do to build the segments inside the if. That way when the condition exists you won’t build the segment. The same caveat here regarding the Set ID.

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

          • #73036
            Shelbi Engle
            Participant

              For clarification – I’m not using Bulk Copy.

              I tried using this logic and it wasn’t successful:

              *Group Iterate on PR1

              *IF Statement using “ne” on my two fields

              1(0).0(%g1).PR1(0).#2(0).[0]  ne =I9  &&  1(0).0(%g1).PR1(0).#5(0).[0]  ne @null

              *Pathcopy PR1 group to PR1 group

              1(0).0(%g1).PR1(0) –> 1(0).0(%g1).PR1(0)

              Also tried the other way around, using “eq” on my two fields and @null on my pathcopy.  Didn’t work.

              I must be missing something….

            • #73037
              Jim Kosloskey
              Participant

                Shelby,

                Are you sure this is a group repetition? Your address pathing shows the segment is defined as repeating.

                Check the variant structure of the Message/Event Type message you are using and make sure you are looking at the correct repetition level – that will make a world of difference if that is not correct.

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

              • #73038
                Shelbi Engle
                Participant

                  This is how I finally got it to work:

                  *Iterate through PR1 group (using a pathcopy)

                  *IF statement:

                  Used “eq” for my two field qualifications

                  @null for all the fields in that segment so the entire segment would not contain any information, thus would not be passed

                  Thanks for the help!

                • #73039
                  Jim Kosloskey
                  Participant

                    Shelbi,

                    OK that implies that the outbound segments have been built prior to your trying to suppress them. That means either BULKCOPY or a preceeding PATHCOPY (copying the entire segment, or preceeding individual field copies are in play.

                    If it is not BULKCOPY (you said you are not using BULKCOPY) then you should find out where those segments are being built and move your checking there as this would be more efficient than building the segments then removing them.

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

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.