Trouble with repeating FRLs in an HRL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Trouble with repeating FRLs in an HRL

  • Creator
    Topic
  • #52433
    David Gordon
    Participant

      I’m not sure why this isn’t working.  We are on 5.4.1 on AIX.

      I have an inbound file that is set up as:

      Header – FRL

      Detail – FRL – One or more

      The outbound is roughly the same, with VRLs instead of FRLs.  I have created the inbound HRL and it works fine:

      Code:

      {NAME Header} {TYPE fmt} { FMT {
         { RECORD Elite-SAP-InboundHeader.frl }
         { RECORD_TYPE frl }
      }}
      {NAME Detail} {TYPE fmt} { FMT {
         { RECORD Elite-SAP-InboundDetail.frl }
         { RECORD_TYPE frl }
         { REPEATWHILE {
             {
                 { FIELD Detail.RecordID }
                 { VALUE D }
             }
         } }
      }}

      Basically, the repeat/while seems like it works fine in the translate, it sees the ‘Detail’ FRL as a group and I can select it as a basis for iteration.

      Here is the outbound HRL:

      Code:

      {NAME Header} {TYPE fmt} { FMT {
         { RECORD Elite-SAP-InboundHeader.vrl }
         { RECORD_TYPE vrl }
      }}
      {NAME Detail} {TYPE fmt} { FMT {
         { RECORD Elite-SAP-InboundDetail.vrl }
         { RECORD_TYPE vrl }
         { REPEATWHILE {
             {
                 { FIELD Detail.RecordID }
                 { VALUE D }
             }
         } }
      }}

      It’s basically the same, but when I go to copy values the translation configurator doesn’t seem to realize that the inbound or outbound ‘Detail’ groups repeat?  I physically do not get the option to insert my iteration variable into the field name.

      Why can I select ‘Detail’ as an basis for iteration if I can’t actually iterate over it?

    Viewing 1 reply thread
    • Author
      Replies
      • #74179
        Jim Kosloskey
        Participant

          Gordon,

          Yeah with that one I think you need to add the repetition in the path yourself.

          For example, detail is your segment name in the HRL I think and one of the fields in the repeating FRL is RecordID so I think in your Xlate you need to specify this (assuming %s1 is the counter):

          COPY detail(%s1).RecordID –>

          Where you have to type in the (%s1).

          That is what I needed to do on 5.6 – hopefully the GUI has been corrected for 5.7 or 5.8.

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

        • #74180
          David Gordon
          Participant

            Funny that you posted this just as I tried that, and yeah it seems to work.

            Thanks, Jim!

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