11 Replies Latest reply: May 15, 2014 10:05 AM by Grant Perkins RSS

    Memo field .vs 4000 character maximum

    lklinstra _

      (v.8 Monarch)I am confused about how to get a memo field, which can be up to 65536 characters to work and I am getting a message that I have exceeded the 4000 character maximum record length.  If 4000 characters is the maximum record length, how can memo fields hold up to 65536 characters?

        • Memo field .vs 4000 character maximum
          Data Kruncher

          The kicker is that memo fields can only be created, IIRC, 254 characters wide, but can go vertically as long as it takes to fill 64K characters.

           

          The solution is typically to create a number of 254 Character fields and them combine them into a calculated Memo field.

           

          A bit of a pain, but it works.

           

          HTH,

          Kruncher

            • Memo field .vs 4000 character maximum
              lklinstra _

              I had a memo field that was 237 characters by 44 lines.  When I went to define the calculated fields (to use the textline function), I got to about the 17th line and I was not allowed to create any more calculated fields because I hit the 4000 character maximum.  How do I get around that?

                • Memo field .vs 4000 character maximum
                  Olly Bond

                  Hello lklinstra,

                   

                  Depends on the data, but if you are hitting limits you could export one table to Access with a suitable field as a unique identifier, then make another bunch of calculated fields and export them, along with the unique ID, to another Access table. That way you'll be able to call upon the data you need in subsequent Monarch projects or other applications.

                   

                  HTH,

                   

                  Olly

                    • Memo field .vs 4000 character maximum
                      Data Kruncher

                      Alternatively, you might be able to use the Monarch Utility program (which should be installed along with Monarch) to split the long lines at a certain point, or after a key text string. You replace the key with a hard return and the key text and then use Monarch the output of the Utility program.

                       

                      As Olly says, it really does depend on the data.

                        • Memo field .vs 4000 character maximum
                          Olly Bond

                          Hi,

                           

                          If you're exploring Utility to prep files, I think (don't have it in front of me) that replacing "xyz" with "\10\13xyz" should insert a CR/LF line feed that ought to behave.

                           

                          Best wishes,

                           

                          Olly

                            • Memo field .vs 4000 character maximum
                              lklinstra _

                              Is there any way using just a Monarch Model to get around the 4000 character limitation?

                                • Memo field .vs 4000 character maximum
                                  Olly Bond

                                  Hello lklinstra,

                                   

                                  Yes, if the 4000 character limit is being breached not by the source data but by the number of calculated fields you are creating. So you could use my approach from my first post. If you are faced with 4000+ character lines in your report, then Utility or its predecessor MSRP (Monarch String Replacement Program) will be needed. But you can automate MSRP calls, so there's no reason I can think off not to use this in your process.

                                   

                                  Best wishes,

                                   

                                  Olly

                                    • Memo field .vs 4000 character maximum
                                      lklinstra _

                                      OllyinMunich, by your "first" post solution, I think you are talking about exporting to Acess?  I can't use Acess in my solution.  My problem with that is we have an in-house companion that works with a Monarch Model to get what we need, so is there any way to get around the 4000 character record limitation within just the model function?   My biggest issue is the number of calculated fields I need to create will exceed that limit.

                                        • Memo field .vs 4000 character maximum
                                          Olly Bond

                                          Hello lklinstra,

                                           

                                          I'm not sure what your "in house companion" is or how it's accessing the data from Monarch. If it's making a COM call then you should be able to steer it to fetch data from either the table or summary window. You might try defining some fields that you deliver in the table and some additional calculated fields as summary measures?

                                           

                                          But without seeing your data, or an anonymised sample of it, it's very hard to guess. If your input data isn't over the 4000 characters per line maximum, and the issue is caused by you needing to generate so many calculated fields that you then exceed the limit, can you limit the data length of the fields?

                                           

                                          Best wishes,

                                           

                                          Olly

                                            • Memo field .vs 4000 character maximum
                                              Grant Perkins

                                              lklinstra,

                                               

                                              The need to generate a huge Memo field and then split it up into separate lines is unusual.

                                               

                                              Could you explain what forces you to do this so that we can ponder whether there is an alternative approach to the entire requirement?

                                               

                                              I think of you want to keep everything within Monarch your limitation (I first hit something different but equivalent to it back in V6 with a 2000 character limit) related to the number of calculated fields will always be an issue. It's realted to the underlying technology and as far as I know there are not too many database engines that, per table, allow for extremely large records without doinig something fancy with them. That's just an observation and not a suggestion that there may be a different approach to the issue along the lines you have taken so far.

                                               

                                              If you really are stick with the current approach the only 'in Monarch' solution that springs to mind is to extend the potential for exporting the 44 Memo lines by splitting the extraction across several models. So for example If you had one model that extracted lines 1-16, another that extracted 17-32 and a third that extracted the remainder they could all be set to export to a shared file (or 3 separate files and then use another model simply to bring them all back together without the need for the calculated fields.)

                                               

                                              Of course that then begs the question about the potential for extracting each line directly and skipping the Memo field but I imagine you had a reason for using the Memo in the first place even thouogh you want to see the lines separated into discrete fields.

                                               

                                              HTH.

                                               

                                               

                                              Grant

                                  • Memo field .vs 4000 character maximum
                                    lklinstra _

                                    My production environment cannot support the Access option.  Is there a setting or option somewhere that will get me around that 4000 character limitation so I can use the memo field to define something bigger?