iterate on DSP segment

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iterate on DSP segment

  • Creator
    Topic
  • #49765
    Bala Pisupati
    Participant

    can anyone tell me how to iterate and still put some values like below

    iterate – segment – 0(0).DSP – %s1

    if 0(0).DSP(0).00063 = “some defined value”

    show 0(0).DSP(0).00061

    0(0).DSP(0).00062

    0(0).DSP(0).00063

    else

    pathcopy 0(0).DSP

    this is how I want it but since I am doing the iterate on the segment I can not get the the values if the value is passed except for the defined message. I am getting them only in else.

Viewing 8 reply threads
  • Author
    Replies
    • #63485
      Jim Kosloskey
      Participant

      Bala,

      Verify you basis is correct. I would do the iteration outside of an IF to make sure of that as well as verifying against the HL/7 tester.

      Also verify your IF is working properly.

      Jim Kosloskey

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

    • #63486
      Bala Pisupati
      Participant

      Thanks for the input Jim.

      The Iterate is outside the if statement and it is working fine. Only thing I have problem is to put the fields before 63 i.e 61 and 62 to display before it goes and checks the if. Since it is in an iterate it is not displaying.

      The steps I wrote are just what I am doing no the exact code that I am working.

      ps: it is doing the path copy when it is in else.

    • #63487
      Jim Kosloskey
      Participant

      Bala,

      based on what you have said, it would be my guess the IF is not functioning the way you intended.

      You may have the IF configured incorrectly.

      Jim Kosloskey

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

    • #63488
      Bala Pisupati
      Participant

      I copied the whole iterate code

      { { OP ITERATE }

         { BASIS 0(0).DSP }

         { VAR %s1 }

         { TYPE segment }

         { BODY {

             { { OP COMMENT }

                 { COMMENT {TODO: Insert new actions here} }

             }

             { { OP IF }

                 { ERR 0 }

                 { COND { 0(0).DSP(0).00063   ge  @val1} }

                 { THENBODY {

                     { { OP COMMENT }

                         { COMMENT {TODO: Insert new actions here} }

                     }

                     { { OP COPY }

                         { ERR 0 }

                         { IN {{= FULL RAST PANEL }} }

                         { OUT @val1 }

                     }

                     { { OP COPY }

                         { ERR 0 }

                         { IN {{= See Solcom for results}} }

                         { OUT @val2 }

                     }

                     { { OP COPY }

                         { ERR 0 }

                         { IN {@val1 @val2} }

                         { OUT 0(0).DSP(0).00063 }

                         { COPYSEP {} }

                     }

                 }}

                 { ELSEBODY {

                     { { OP COMMENT }

                         { COMMENT {TODO: Insert new actions here} }

                     }

                     { { OP PATHCOPY }

                         { ERR 0 }

                         { IN 0(0).DSP }

                         { OUT 0(0).DSP }

                     }

                 }}

    • #63489
      Jim Kosloskey
      Participant

      Bala,

      In your IF do you really want to ALWAYS test against the FIRST  repetition of the DSP segment?

      If not, you need to properly insert your iteration counter in the field’s address path.

      Jim Kosloskey

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

    • #63490
      Bala Pisupati
      Participant

      Hi Jim

      I did put s1 in the iterate if that is what you mean but no use. 🙁

    • #63491
      Jim Kosloskey
      Participant

      Bala,

      You need to use %s1.

      Jim Kosloskey

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

    • #63492
      Bala Pisupati
      Participant

      I did use %s1 Jim.   🙁

    • #63493
      Jim Kosloskey
      Participant

      Bala,

      Well I am back to you verifying the IF is correct. If the ITERATE is correct but you are never taking the true path of the IF Action then there is something not correct with the IF.

      Try making a less complicated Xlate (copy what you have to a new Xlate) by getting rid of all of the non essential and try to assure the values tested in the IF are correct. Then double check the IF Action properties.

      If the inspection looks OK, then try adapting the IF properties to see if that makes any difference.

      Sometimes using the string operands rather than the numeric operands works (or vice versa).

      I would put something very simple inside the true path of the IF Action such as COPYing a literal to an unused outbound field in the repetition to see if the value appears in the tester.

      Jim Kosloskey

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

Viewing 8 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