2 NTE segments in output message from 1 NTE in input message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf 2 NTE segments in output message from 1 NTE in input message

  • Creator
    Topic
  • #52642
    Jeremy Bumgarner
    Participant

      I need to create 2 NTE segments from 1.

      example NTE:

      NTE|3|P|Order comment goes here|GI^TEST?

      I need to have these results:

      NTE|3|P|Order Comment goes here|GI^TEST?

      NTE|4|P|Order Comment goes here|GI^COMMENT

      Any ideas??

    Viewing 5 reply threads
    • Author
      Replies
      • #74954
        Jim Kosloskey
        Participant

          Jerry,

          It looks like there can be multiple inbound NTE segments.

          Is that true?

          Does the segment you needed added always go at the end of how many NTEs there are?

          Is the added NTE to always have the content you show?

          If the answers to the above are all true then you can ITERATE through the inbound keeping track of the ITERATE counter value (you can use your own counter – let’s say %s99 if it is a segment repetition ).

          When the ITERATE is through add one to your counter using the MATH Action and then COPY the data to each outbound field using your counter in the address path where the ITERATE counter normally goes.

          If you need additional understanding regarding using your own counters (there is a ‘trick’ to that) either search the forum (it has been discussed multiple times) or email me and we can get you going off-line.

          This is most likely very doable in the Xlate without Tcl involvement.

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

        • #74955
          Jeremy Bumgarner
          Participant

            More information:

            This is coming in on an ORM^O01 message.

            We always receive it with one NTE segment.

          • #74956
            Jim Kosloskey
            Participant

              Jerry,

              OK if there is only one NTE ALL the time then you do not need to do an ITERATE. But make sure that you will only ever receive one NTE because if you later discover you can receive more you will need an ITERATE and might as well do that work now.

              With only one NTE, COPY your first NTE with the default zero on the appropriate address path location. Then make your second NTE by using 1 (one) in the appropriate address path location.

              The reason I thought you had multiple NTE segments is because the NTE-1 in the example you sent has a ‘3’ in it implying there was a 1 and 2.

              If you do find you can have multiple NTE segments inbound and if what you are adding has to go after only the first NTE, you would still do an ITERATE but what you do inside the ITERATE would change.

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

            • #74957
              Jeremy Bumgarner
              Participant

                Jim:

                Thanks for the phone call, patience, and overall friendliness.  It is greatly appreciated.

                For everyone’s reference, here is how we (Jim) solved it:

                Pathcopy the NTE(0) segment to the outbound message

                Pathcopy the NTE(0) segment to NTE(1) outbound message

                Copy my constants to NTE(1) that need to change.

                Sometimes simple is best.  What was that old acronym from programming classes?  Oh yeah, K.I.S.S or Keep It Simple Stupid (meaning me!!).

              • #74958
                jigar mehta
                Participant

                  Hello Jim,

                  We are trying to map multiple/ repetitive obx and NTE to OBX, it seems count for obx works and maps as usual, but when I try iterate nte to map obx, instead of create new obx, it overwrite on existing obx.

                  I am sure i am missing either basis or variable or loop, but if u can help me point in right direction, i would appreciate

                  Jigar

                  Jigar B Mehta

                  Interface Consultant

                  CHOC Tower II

                  jmehta@CHOC.ORG

                  (714)532-7633 Office

                  (224)245-4353 Cell

                • #74959
                  James Cobane
                  Participant

                    Jigar,

                    You will need to use a separate iteration variable on your outbound and increment it as you iter through your inbound OBX’s and NTE’s.

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