Manipulating Iterate values

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Manipulating Iterate values

  • Creator
    Topic
  • #48317
    Daniel Lee
    Participant

    I’m using Qvdx 3.8.1P and am iterating over a field %f1.  When I write to the destination field I want it to write to one less than the source field (%f1 – 1).  How do I do this in the Xlate?  I’ve tried to use a math function but the math function doesn’t allow me to use %f1 as a variable.  Even if I could it doesn’t look like it lets me use 0(0).PR1(%s2).01316(@modDest).[0] in the destination.  I’ve tried hard coding @modDest to a 2 and it still throws it in the first repetition of the field.  There has to be a simple answer but I haven’t run into this before.

    Thanks,

    Daniel

Viewing 3 reply threads
  • Author
    Replies
    • #58312
      Daniel Lee
      Participant

      Nevermind.  I figured it out.  I had to use $%f1 to reference the variables in the Xlate.

    • #58313
      Vamshi Mugu
      Participant

      Hi Daniel,

      Could you send me some more details, please? I am trying to do a similar thing. It would solve my problem if I could use a variable in place of %s1 for destination in:

       1(%g1).0(0).OBX(%s1) -> 0(0).OBX(%s1)

      I still want the source values to use %g1 and %s1, but want to be able to use some variable (global) in place of %s1 on the destination in the above translation [eg. 0(0).OBX($myVar)].

      Thanks for your help,

      Vamshi Mugu,

      Altru Health System.

    • #58314
      Daniel Lee
      Participant

      What I did is just make up a new variable called %s2 and used that instead of the %s1.

      So lets say you wanted to make your outbound segment to be one less than your inbound segment iteration.

    • #58315
      Vamshi Mugu
      Participant

      Thanks, Daniel, that $ did the trick. Appreciate your help.

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

Forum Statistics

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