Blank line to output

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Blank line to output

  • Creator
    Topic
  • #52862
    Mike Campbell
    Participant

      Cloverleaf 5.7, Patch 2 on AIX.

      We are receiving inbound Result messages from a LAB.  They have ‘blank’ lines included in the NTE for formatting into our receiving system.  

      We are using a bulkcopy on the xlate with a couple of field updates.  

      The sending system is giving us  NTE|1||

                                                     NTE|2||

                                                    NTE|3||Order:  BCCRT

                                                    NTE|4||

                                                    NTE|5||

      After Cloverleaf, the message has:

                                                   NTE|1

                                                   NTE|2

                                                   NTE|3||Order: BCRRT

                                                   NTE|4

                                                   NTE|5

      What’s the best way to get the extra || at the end of the blank NTE?

      Thanks

      Mike Campbell.

    Viewing 2 reply threads
    • Author
      Replies
      • #75710
        David Harrison
        Participant

          After the bulk copy you could iterate through the repeating NTE segment and, if NTE 3 is blank, copy %s1|| to 1(0).0(0).0(0).NTE(%s1).#1(0).

          Does that make sense?

        • #75711
          Jim Kosloskey
          Participant

            Mike,

            Are you sure the receiving system needs to have the field separator for the non-populated field at the tail end of a segment (HL/7 does not require that)?

            If they really don’t care then you don’t have to do anything (what is being produced is correct according to HL/7).

            The only issue with what David proposed is if the sending system ever changes the value in MSH-1 that fix will be broken.

            Another way that would adjust to the MSH-1 value is to change the outbound variant to make NTE-3 a required field. When doing field-by-field copies un-populated fields get their separators properly placed.

            However, since we rarely use BULKCOPY here you will have to test to make sure BULKCOPY does not override the default action of the Xlate when field-by-field COPY is deployed.

            email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

          • #75712
            Mike Campbell
            Participant

              Now that the issue is resolved, I need to get a added to the end of the segment.  Can I just use in the xlate?  Or do I need to use nr or something like that?

              Thanks.

              Mike C.

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