Add OBX

  • Creator
    Topic
  • #49761
    Mark Perschbacher
    Participant

    Greetings, I am trying to tack an additional OBX onto an ORU, and insert a line of asterisks into it,  but I think my logic may be flawed.  By reviewing the other posts related to this, I am trying to iterate through the OBX with %g1, MATH add one to it, and copy it to %g2.  If I iterate again using %g2, and COPY =***************** => 1(0).1(0).1(%g2).OBX.00573, it just over writes the first OBX.  Any help would be greatly appreciated.

Viewing 4 reply threads
  • Author
    Replies
    • #63464
      Jim Kosloskey
      Participant

      Mark,

      You only need the one iteration.

      After that iteration, %g2 should have a value one greater than %g1 (after the MATH ADD). Simply copy the literal to the OBX field as you are doing.

      A key here is to specify $%g1 and $%g2 in the MATH ADD Action.

      Jim Kosloskey

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

    • #63465
      Mark Perschbacher
      Participant

      So after the %g1 iterate, I run the MATH add, then COPY =***************** => 1(0).1(0).1(%g2).OBX.00573?

    • #63466
      Mark Perschbacher
      Participant

      Still can’t get it to work here is what I have

      BULKCOPY

      ITERATE: TYPE:group BASIS: 1(0).1(0).1 VARIABLE: %g1

      MATH ADD =1 $%g1 -> $%g2

      COPY =***************** => 1(0).1(0).1(%g2).OBX.00573

    • #63467
      Jim Kosloskey
      Participant

      Mark,

      That’s correct.

      ITERATE

          stuff inside iterate

          .

          .

          .

      (outside – after – iterate)

      MATH ADD $%g1 =1


      > $%g2

      COPY =************  


      >  1(0).1(0).1(%g2).OBX.00573

      That should do it (assuming there is no manipulation of %g1 inside the ITERATE).

      Thanks,

      Jim Kosloskey

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

    • #63468
      Mark Perschbacher
      Participant

      Thanks Jim, I had to move the MATH ADD inside the iterate, and since this is my first usage of the MATH function, I didn’t realize that the operation had to be composed with the $%g1 on a line below the =1 in the Source.

      =1

      $%g1

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

Forum Statistics

Registered Users
5,125
Forums
28
Topics
9,294
Replies
34,439
Topic Tags
287
Empty Topic Tags
10