Iteration Help

  • Creator
    Topic
  • #51248
    Kevin Crist
    Participant

    I have iterated the NK1 segment so we send more than one, that seems to be working ok, but i am trying to put in a table so i can change the relationship codes in the NK1-3, but i am only changing the first NK1 segment, I have tried a few different things with no luck, can someone point me in the right direction…

    thanks

Viewing 7 reply threads
  • Author
    Replies
    • #69359

      Kevin, could you please post a picture of your variant, too?

      -- Max Drown (Infor)

    • #69360

      Most likey, you need to do it like this: …NK1(%s1)…

      -- Max Drown (Infor)

    • #69361
      Kevin Crist
      Participant

      here is my variant. its 2.3

    • #69362
      Keith McLeod
      Participant

      The Variable %s1 goes at teh end of the basis.  Your Table statement needs to look more like:

      Table 0(0).NK1(%s1).#3 –> 0(0).NK1(%s1).#3

      When you get a chance view messages in SMAT with you variant selected and take note of the counters such as where the %s1 is located.  I had some other iterate examples out on clovertech that you may want to look at.  It includes the basis when the iterate is within an iterate.  You need to make sure your basis contains the variable of the surrounding basis should you have one.  Good luck…

    • #69363
      Kevin Crist
      Participant

      ok, i have tried what you said and a few other things but i am still having some issues. It is now iterating the last NK1 segment only. i have a sample below. The inbound variant is the same as the outbound. Iterations always test my patience.

    • #69364
      Jim Kosloskey
      Participant

      Kevin,

      Did you remember to change your PATHCOPY? It needs the same change as your TABLE Action.

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

    • #69365
      Keith McLeod
      Participant

      Good Catch Jim.  You may want to move the pathcopy above the iterate with the following:

      pathcopy 0(0).NK1 –> 0(0).NK1

      Notice I removed the segment repetiion above.

      Or if you wish to keep in in the iterate at its current location.

      pathcopy 0(0).NK1(%s1) –> 0(0).NK1(%s1)

      This should do the trick…

    • #69366
      Kevin Crist
      Participant

      Beautiful. That worked. Thanks to both of you for your time.

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

Forum Statistics

Registered Users
5,119
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10