ITERATE through a FRL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ITERATE through a FRL

  • Creator
    Topic
  • #48168
    Noel Wallis
    Participant

      I am trying to iterate through fields in an FRL.  I have tried defining the FRL in different ways but have had no success. i.e

      Field_0

            ch 13 bytes

            ch 13 bytes

            ch 13 bytes

            ……….

      I have tried every combination of the following with no success.

      Action:ITERATE  Type:list  Basis:Field_0 Variable:%l1  

      Has anyone done it before ?

    Viewing 0 reply threads
    • Author
      Replies
      • #57887
        Noel Wallis
        Participant

          Just in case someone has hit the same type of problem, hope this is helpful.

          This will loop through the subfields of Field_0 and create a NTE segment for each field.

          FRL Definition:

          Field_0

               ch 13 bytes

               ch 13 bytes

               ch 13 bytes

               ch 13 bytes

               ch 13 bytes

               ch 13 bytes

          { { OP ITERATE }

             { BASIS {0 1 2 3 4 5} }

             { VAR %l3 }

             { TYPE list }

             { BODY {

                 { { OP COPY }

                     { ERR 0 }

                     { IN {{Field_0.[%l3]}} }

                     { OUT 0(0).NTE(%l3).00098(0) }

                 }

             }}

          }

          Same type of loop but different FRL definition.  Loop through the field names.

          Field_0

               ch 13 bytes

               ch 13 bytes

          Field_1

               ch 13 bytes

               ch 13 bytes

          Field_2

               ch 13 bytes

               ch 13 bytes

          { { OP ITERATE }

             { BASIS {0 1 2 3 4 5} }

             { VAR %l3 }

             { TYPE list }

             { BODY {

                 { { OP COPY }

                     { ERR 0 }

                     { IN {{Field_%l3.[0]}} }

                     { OUT 0(0).NTE(%l3).00097 }

                 }

                 { { OP COPY }

                     { ERR 0 }

                     { IN {{Field_%l3.[1]}} }

                     { OUT 0(0).NTE(%l3).00098(0) }

                 }

             }}

          }

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