Searching for a specific group in the OBXs

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Searching for a specific group in the OBXs

  • Creator
    Topic
  • #52762
    Kevin Crist
    Participant

      i have to search through the OBXs for the phrase “RADIOLOGY CONSULTATION” which is usually in the 3rd OBX.5 field as part of a header recieved from the sending system. I need to do some work based on if that is true or not and not sure how the best way to do it.

      I have an example of the screen shot, there is about 29 -30 spaces in the OBX until the phrase, is there a way to code for that?

      This Xlate is using bulkcopy.

    Viewing 2 reply threads
    • Author
      Replies
      • #75410
        Daniel Lee
        Participant

          I think I’d probably copy that field to a variable first striping all the spaces out of it on the copy.  Then in your if statement check to see if the variable eq “RADIOLOGYCONSULTATION”

        • #75411
          Kevin Crist
          Participant

            i think my problem is that is scanning every OBX, so even if it is in the 3rd OBX it keeps going and overwriting until then until it is basically never equal to the variable. Is there some way to break it like in tcl?

          • #75412
            Jim Kosloskey
            Participant

              Use one iteration to discover if the text exists (the CT in the Xlate IF might work saving Tcl), set a temp variable switch indicating found or not found (y and n or 0 and 1 whatever you prefer).

              Iterate again checking the temp variable set in the first iterate and do your work depending on that – don’t forget to reset the environment variable when you no longer need it set.

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

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