User ITERATE Type does not honor a proper list

Homepage Clovertech Forums Cloverleaf User ITERATE Type does not honor a proper list

  • Creator
    Topic
  • #120998
    Jim Kosloskey
    Participant

    Cloverleaf 2209.

    I used the User Type ITERATE with a well formed list. The second element of the list contains an imbedded space to wit:

    12345|HospitalEMR|EMR {6789|different ID|ID}

    Note the second element has an imbedded space but is properly encapsulated in curly braces.

    When processing the ITERATE Variable (in this case %u1) has the correct value for the first element but only has up to the space of the second element (so includes 6789|different – not 6789|different ID|ID) and thus there is a bogus third element of ID|ID.

    I cannot report this as a bug to INFOR but I think it is. It would be useful if the User Type ITERATE handled proper lists properly.

    If anyone can indicate this is not a bug and have any hints as to what I may have missed, please let me know.

     

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

Viewing 3 reply threads
  • Author
    Replies
    • #121002
      Jason Russell
      Participant

      How are you copying the data into the variable (i assume) before iterating? I’ve noticed that CL gets real funky real quick when doing literals via the copy command.

    • #121003
      Jim Kosloskey
      Participant

      Jason,

      Thanks for the suggestion.

      No, the list is built in a temp variable using a Tcl proc and Tcl List commands. So, I know the list is properly formed. Besides, I echo out the temp variable prior to usage in the User ITERATE and it has the intended structure.

      It is possible the Xlate is modifying the list before it uses it – but that to me is a bug because the well-formed list does not get processed properly.

       

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

    • #121009
      Jason Russell
      Participant

      Have you echo’d out the xlateInVals on the interate itself? I was messing around with this and attempting to build a tcl script to build/manipulate the lists but keep getting sidetracked, and I’m wondering even though the first item in the list has no spaces, it’s causing issues because the second item is enclosed in {}’s, but DOES have a space, and CL is reading that second space as a delimiter because the FIRST item does not have the enclosing {}’s.

      I’ll try to spend some time messing with it to see if I can get around that issue.

      An alternate (less viable and much more short term) solution is replacing the whitespace ” ” with another temporary character until you’re outputting the iterate itself then swap it back.

    • #121011
      Jim Kosloskey
      Participant

      Jason,

      Yeah, in this case I am using Tcl to build the list being used so I could force my list to comply with the Xlate but I think this is a bug. If it is, it should be fixed. Users should be able to create well-formed lists and not have to worry if the tool (or tools) will honor them in my opinion.

      Unless the list that is being created (using normal Tcl list commands) is not a well-formed list as expressed.

      Additional investigation shows that the {are being escaped (\{ and \}) even though the { and } are not in the MSH-2. Something is definitely not right here.

      If you have time, and would like to do a desktop share session to brainstorm this some, email me.

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

Viewing 3 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

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