Need part of data in a field

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Need part of data in a field

  • Creator
    Topic
  • #51135
    Steve Lambert
    Participant

      I have data in ZOM.45 that I need to move to OCR.3 but I just need

      the data between the tildes.

      |16433^HBOC~090819-ALM-00004~00005646^LA01|

    Viewing 1 reply thread
    • Author
      Replies
      • #68901
        Keith McLeod
        Participant

          If you check what that field path is by displaying in the testing tool you can easily see what you need to copy for a path.  You can also do this in later versions of SMAT and set your detail level up.

          3(0).ZOM(0).#45(0)  :  >123456-123^ABC<

          3(0).ZOM(0).#45(1)  :  >0987654321^DEFG<

          3(0).ZOM(0).#45(2)  :  >5555555555^HIJK<

          Originally this looked like  

          |123456-123^ABC~0987654321^DEFG~5555555555^HIJK|

          So you would copy 3(0).ZOM(0).#45(1) –> OCR:? whatever is your destination.  The ‘1’ in parentheses is the field repetition index.  Hope this helps…

        • #68902
          Jim Kosloskey
          Participant

            Steve,

            That is a repeating field.

            ITERATE over the field and slect the repetition you want.

            OR – if you know the repetition of interest is always the second repetition set the repetition value following the field specification in the path notation -something like: …ZOM#45(1) (note 1 is the second repetition since the repetition count is relative to zero).

            Also make sure the variant definition has the field defined as repeating.

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

        Viewing 1 reply thread
        • The forum ‘Tcl Library’ is closed to new topics and replies.