Removing Segments Before Sending Message to Receiving System

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Removing Segments Before Sending Message to Receiving System

  • Creator
    Topic
  • #48635
    Ariba Jones
    Participant

      I need to not send the IN1, IN2, and IN3 segments of ADT messages to the receiving system if a particular field in the PV1 segment is equal to a certain value.  Does anyone know how to not send certain segments when the value of a field in another segment is equal to a certain value?  I have translations setup for my ADT interface.  I wonder if there is a way I could do this using the translations, but without having to null each field of those segments.  

      Thanks in advance!

    Viewing 7 reply threads
    • Author
      Replies
      • #59247
        Jim Kosloskey
        Participant

          Ariba,

          Are you using BULKCOPY in your Xlates?

          Jim Kosloskey

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

        • #59248
          Ariba Jones
          Participant

            Yes, I am.

          • #59249
            Anonymous
            Participant

              What we did here was on the tps outbound run a tcl script that reformated the messages. With bulkcopy being used I don’t know how to stop them from getting there.

            • #59250
              Jim Kosloskey
              Participant

                Ariba,

                With BULKCOPY in play I think you have a few choices (assuming you want to do this within an Xlate and not use Tcl).

                1. Make sure the IN1, etc. segments in the Outbound Variant are Optional.

                   Then COPY @null to each field in the outbound segments inside an IF Action.

                2. This one I am not so sure of but I think it will work:

                   Again make sure the segments in question are Optional in the Outbound Variant.

                    PATHCOPY @null to the segments of interest inside an IF Action.

                3. Remove BULKCOPY and replace with PATHCOPY (as many as needed for the desired segments) with the segments of interest’s PATHCOPY being inside an IF Action.

                4. Remove the BULKCOPY and build each field of each segment independently.

                Jim Kosloskey[/list]

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

              • #59251
                Ariba Jones
                Participant

                  Jim,

                  Thanks for the suggestions.  Option #2 worked for me.

                  Ariba

                • #59252
                  David Teh
                  Participant

                    Hi folks,

                    I am looking to do something similar to Option 2.

                    I have a translation that has BULKCOPY.

                    If I simply want to discard every OBX segment (repeated in source message) using ITERARE and PATHCOPY, what should the syntax be?

                    Should I be iterating ‘list’ or ‘segment’?

                    TIA!

                  • #59253
                    Daniel Lee
                    Participant

                      David,

                      It really depends on what your varient looks like.  If you can post a copy of your varient it would help.

                      If you’re not removing the OBX conditionaly can you just remove the OBX segment from your outbound varient?

                      -Daniel

                    • #59254
                      David Teh
                      Participant

                        Got it done! 🙂

                        The variant is used by other ‘standard’ XLTs, so I am not too keen to amend it.

                        This is what I did.

                        1. I have an ITERATE using ‘list’ type, with Basis: ‘0 1 2….30’, Variable: ‘%s1″.

                        2. Within that ITERATE, I have a PATHCOPY:

                                             Source: @null

                                             Destination: 0(0).OBX(%s1)

                        Next question:

                        If the source system is not sure what is the maximum number of OBX segments they may sent, is there a way to cater for that?

                        Thanks folks!

                        Daniel Lee wrote:

                        David,

                        It really depends on what your varient looks like.

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