Xlate -> Replace full value in PID.5

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Xlate -> Replace full value in PID.5

  • Creator
    Topic
  • #54567
    Jerry Tilsley
    Participant

      All,

      I’m using Cloverleaf 6.1 and am would like to replace the full value in PID.5, but when I put in

      Code:


      { { OP COPY }
                         { ERR 0 }
                         { IN =SCRMC }
                         { OUT {{0(0).PID(0).#3(%f1).[5]}} }

      this only replaces the first value in a string seperated by &.  How can I get Cloverleaf to replace the entire field with my single value?

      Thanks,

      Jerry

    Viewing 2 reply threads
    • Author
      Replies
      • #82019
        Robert Kersemakers
        Participant

          Hi Jerry,

          Try using a PATHCOPY instead of a COPY, it should use the whole component [5] instead of the (implicitely assumed) first subcomponent [5].[0].

          Alternatively you could do a

          Code:

          PATHCOPY @null -> 0(0).PID(0).#3(%f1).[5]

          to clear the complete component and then use your COPY statement.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #82020
          Charlie Bursell
          Participant

            Looks to me like you are wanting to replace the whole field, including the ampersands, with a value.  Then do it in two steps like:

            PATHCOPY @null -> 0(0).PID(0).#3(%f1)

            COPY 0(0).PID(0).#3(%f1)

            The PATHCOPY will clear the whole field while the COPY will put only what you want in the field

            Assume PID.3 looks like:  |123^^^^456&78|

            If above is ABC, now PID.3 looks like:  |ABC|

            If this is not what you want can you give examples of before and after?

          • #82021
            Jerry Tilsley
            Participant

              Thanks all, this now works!  A bit new to the xlate side of things, I usually just code it all in TCL, but trying to branch out a bit.  

              Thanks,

              Jerry

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