Adding more fields

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Adding more fields

  • Creator
    Topic
  • #54129
    Jawad Chaudhry
    Participant

      How can I add more fields at the end of a segment? I am trying to append pipes up to field 46 if fields 37-46 are blank for IN1. Any ideas? I am using tcl.

    Viewing 1 reply thread
    • Author
      Replies
      • #80271
        Levy Lazarre
        Participant

          Hello Jawad,

          I assume that you have broken the segment into a list of fields, based on the field separator. For example, with PV2

          set PV2flds [split $seg $fldSep]

          All you have to do is append empty fields to the list, up to the desired number. The code is like:

          Code:



          while {[llength $PV2flds] < 46} { lappend PV2flds {} }

          The segment will now have the number of fields you want.

          I hope this helps.

        • #80272
          Russ Ross
          Participant

            Take a look at our tps_pad_segment proc examples and other approaches at this URL:

            <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1330&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1330

            Bob Richardson also posted a proc called tps_add_blank_fields at the URL above.

            Russ Ross
            RussRoss318@gmail.com

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