8 Replies Latest reply: May 15, 2014 10:14 AM by adonis _ RSS

    alignment issue

    adonis _

      I have a somewhat simple issue in that the header is aligned differently throughout the file.  Normally when I deal with Files, they are standard, so basically My issue is as follows:

       

      |               ACCOUNT 12345                |   LAST LOAD: 04/10/12  

      |           ACCOUNT 25828 PLEDGED            |   LAST LOAD: 04/10/12 

       

      /CODE

      How would you guys capture the 5 digit account number regardless of moving and the date that is available with it being in different locations.

      using Monarch v10.01

       

      This pattern happens for 6 different accounts 4 of which are the same format while 2 others are not but the problem is if you don't capture the heading the data for the missing account shows up in the wrong account.

      Need to be able to separate the accounts though the 5 Digit Account can vary.

        • alignment issue
          adonis _

          I am able to probably resolve by creating multiple monarch items where I can filter out the whole line doing a right function or left function but I know there is a simpler way which would allow for me to capture the floating 5 digit account properly.

           

          I did resolve it using 2 separate Monarch Processes, but I have seen it done in 1, just want to get used to doing that way as it is more efficient.

            • alignment issue
              Olly Bond

              Hello Adonis

               

              This looks like a standard floating trap challenge. Check out weblog.prn from the tutorial for a quick overview.

               

              Best wishes

               

              Olly

                • alignment issue
                  adonis _

                  Will do and i will let you know how that goes be safe my friend have a good weekend

                    • alignment issue
                      Grant Perkins

                      Hi adonis,

                       

                      Does your model design trap on the vertical bars? (I assume that the bars are in the report not something you have used to separate the data fields for the illustration.)

                       

                      If so it looks like the text wth the account information has been centred in a text field.

                       

                      If the floating trap option proves challenging for any reason you could try just extract the entire Account field - everything between the vertical bars - and then use a calculated field to extract just the account number from that.

                       

                      Having said that there are some potential challenges with the using the vertical bar as a trap character - you may already be fully aware of that. But in principle so long as you can extract the whole field string (or the entire line if you get desparate!) the slice and dice work to get the account reference number into a new calculated field should be straightforward using LTRIM and LSPLIT functions.

                       

                      Do let us know how you get on.

                       

                       

                      Grant

                        • alignment issue
                          adonis _

                          grant

                          it has the bars but they are not in the same position from what I see.

                          the way I was able to fix this was creating 2 different monarch projects to export the data only after I performed a left and right function to filter out the noise, but I know there is a way to do it one,

                          I will take a look when I get back to work tomorrow if the training one Olly pointed out works, keep you posted

                            • alignment issue
                              adonis _

                              Olly thanks bud, actually instead of doing it in 2 all I needed to do was click on the darn floating trap button, I never used that in over 4 years go figure, anyways you learn things every day.

                              be safe mate.

                              the other option was just split both different date types into 2 different models/projects and then import the output data which I do anyways in MS Access and reconcile it.

                                • alignment issue
                                  elginreigner _

                                  Floating trap will work wonders. I use this heavily on client files where I expect the data to move.

                                    • alignment issue
                                      adonis _

                                      thanks Elgin but I have been spoiled, for the most part the files I get are delimited, and or fixed length, standard in length, very little ad hoc like reports, so over the years the most complications I get is basically how I want to slice the data and whether I can do it all in Monarch or I can use MS Access to do my reconciliation which then I use my batch files to work wonders.  I would suggest using batch files when at all applicable, does amazing things for your health.

                                      be safe.