4 Replies Latest reply: May 15, 2014 9:51 AM by Grant Perkins RSS

    Floating trap w/ floating data field

    BobM _

      I'm having what seems like should be a fairly simple issue to resolve.  I'm performing a floating trap in a footer, using NN:NN:NN.  The data field I want is always 4 characters in length and 2 spaces LEFT of the trap.  However Monarch seems to want to always pull whatever 4 characters (or spaces) are in the exact same column as the field I selected, regardless of where the trap was found.  If I include the 4 characters I want as part of a non-blank trap, Monarch just select the 1st 4 characters of the row.  Thanks for any help.

        • Floating trap w/ floating data field
          Grant Perkins

          Bob,

           

          Are you trying top trap a string "NN:NN:NN" or, as I suspect, does that trap represent some numbers (variable) with colons as separators?

           

          Floating traps can work very well in some circumstances - network system log files for example where you have an unambiguously identifiable string to use for the trap which happens to move horizontally. But in other cases - where the data dimansions of the line vary and multiple traps may be set to try to reflect this life can get rather too interesting.

           

          If the trap characters are general variables rather than a specific string life gets more than interesting.

           

          It sound like you are trying to use the trap to both spot the footer AND position a field. I would be tempted to use it for trapping only (which seems to work?) and find an alternative way to get the field data. Perhaps just take the whole line and then parse it to pick the characters you want after the NN:NN:NN string?

           

          It may not make much difference to the final suggestion but it would be useful to know which Monarch version you have so we know how many of the functions we have available to play with for parsing the line.

           

          HTH.

           

          Grant

          • Floating trap w/ floating data field
            Data Kruncher

            Welcome aboard Bob,

             

            Again, what's with you first time posters lately - you've all been coming up with some pretty tricky challenges!

             

            You're right - you won't be able to trap this properly in the manner you've described.

             

            To solve this, we need to "think outside the template", to paraphrase a bit.

             

            First, select a sample line in the report and create footer template with a floating trap to capture the time field. NN: above the hours in the same line should do that. Save the template.

             

            Now select the same sample line, and create another footer template. Above your four character field, create this floating trap: AAAAbbN (four alphas, two blanks, and a number). Define your four character field, and you'll see it shaded in your report, floating within the row.

             

            With multiple footer templates available in v8, you can resolve this problem. Of course, this solution is only available to v8 users. Yet another reason to upgrade!      

             

            Let us know if this resolves your problem Bob.

             

            Grant, once again you got in while I was responding. BTW, you inbox is full    - can't PM you. Also, don't forget about the version information now supplied in the user profile.

             

            Regards,

            Kruncher

            • Floating trap w/ floating data field
              BobM _

              Thanks for the help and I'm sorry I wasn't more clear on a couple of the details.  Yes, I meant NN:NN:NN as a numeric trap for a time value.  Also, when I said I was trying to capture 4 characters, they are alphanumeric.  I'm using Monarch v.8 Pro.

               

              I'm a bit fuzzy as to how multiple footers helps.  I more or less tried what you suggested using ØØØØßßÑÑ:ÑÑ:ÑÑ in the second footer, but it still seems to want to grab the first 4 non-blank characters in the line as the data.  As a side note, it doesn't trap every line it should unless I remove one or both of the ß traps.

               

              Here's a smattering of the report I'm working with.  Data changed to protect the innocent.   smile.gif[/img]   I can grab the member number, date, and tran code from the detail lines fine.  I just need the operator ID (always 2 spaces left of the time) from the footer line, which is where the wheels are falling off.

               

              [font="courier"]***    ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE               

                  TO:123456789 S 010000      06/27/06  95513  06/27/06  DCST        635,000.00              625,201.44  G/L CR 901.010

                  FR:123456789 S 020000      . . . . . . . . . . . . . . . .        635,000.00              100,600.00  G/L DR 901.020

                     XXX-CO FCU              TERM:#$$C  OPER:@WEB  08:37:16                                                                               

              REMOTE USER-XXXXXXXXXXXXXXXXXXXX  DATE-06/27/06  TIME-083830  TRAN-DCLP  TERM-#$$C                                    

                  •    ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE  G/L DR 725.012

                  •    ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE  G/L DR 725.012

                  •    ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE  G/L DR 725.012

                     123456789 S 010001      06/27/06  95615  06/27/06  DCSZ         88,882.03              956,514.97- G/L CR 901.010

                     123456789 S 010000      06/27/06  95614  06/27/06  DCSZ         59,869.56            3,264,667.17- G/L CR 901.010

                     123456789 S 010000      06/27/06  95613  06/27/06  DCSZ          1,149.49              139,948.82- G/L CR 901.010

                     XXXXXXX CREDIT UNION    TERM:#$D1  OPER:TR01  08:39:48      STMT CODE: 28                                       

                     XXXXXXX CREDIT UNION    TERM:#$D1  OPER:TR01  08:39:48      STMT CODE: 28                                       

                     XXXXXXX CREDIT UNION    TERM:#$D1  OPER:TR01  08:39:48      STMT CODE: 28                                                                               

              REMOTE USER-XXXXXXXXXXXXXXXXXXXX  DATE-06/27/06  TIME-091530  TRAN-DCST  TERM-#$BQ                                    

                                       --- TRANSACTION CODE = DCWW (SENT) ---                                                        

              ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE     G/L DR 901.010  

              123456789 S-010.000     06/27/06  95901  06/27/06  DCWW         10,000.00                 115,697.10- G/L CR 731.024  

              XXXXXXX CORPORATE CU                                                                               

              123456789  XXXXXXXXX CHOICE CU         TERM: #$$C      @WEB  09:18:56                                                 

              REQUEST PROCESSED WIRE TRANSFER-DCWW  MEMBER-123456789  AMOUNT-     10,000.00 OPER ID-@WEB  09:18:56  SEQ# CO0000400000

                                                                                               

                  •    ...MEMBER / ACCOUNT...  BUS DATE  CAN #  EFF DATE  TRAN            AMOUNT             NEW BALANCE  G/L DR 802.010

                     123456789 S 099000      06/27/06  94845  06/27/06  DCSY         29,540.04                    0.00  G/L CR 901.099

                     XXXXXXX CU CLEARING     TERM:#$CP  OPER:AB01  08:11:22      STMT CODE: SD                                       

                /font[/quote]

              • Floating trap w/ floating data field
                Grant Perkins

                Originally posted by Data Kruncher:

                Also, don't forget about the version information now supplied in the user profile.

                 

                Regards,

                Kruncher /b[/quote]Ah, good point. Forgot to check since I seemed to have a problem seeing the info just after this was implemented so somehow the subconscious forgot about it!

                 

                 

                Grant