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

    trapping

    MindQuest001 _

      Got a simple question.  I've got an issue where it would be much easier to trap on what the character is not rather that what it is.  for example, got a report that I want to exclude all the lines that start with '>>', I've tried several other things and if this is posible it would be great.

       

      Thanks

        • trapping
          Bruce _

          Mind

           

          Is it possible that you can trap all the rows (both with & with out the >>) on the template window, but then use a filter on the table window to exclude the rows with out ">>"?

           

          That's usually the quickest way to do soemthing like this.

           

          On the template these is no way to negate the choice of a selection.

           

          Regards,

          • trapping
            MindQuest001 _

            Thanks,

            That should work.  Didn't even thing about that.

            • trapping
              MindQuest001 _

              Looked at it again, and that is not going to work. the problem is the data that I need to convert.  I am trying to convert an Inventory table from one system to another.  basically 6 locations, for each part there are 6 locations with qoh.  what I get in output is:

               

              WT909        4   Description  More Stuff   

              >> # 2       3   Description  More Stuff   

              >> # 3       3   Description  More Stuff   

              >> # 4       3   Description  More Stuff   

              >> # 5       3   Description  More Stuff   

              >> # 6       3   Description  More Stuff   

              AB          12   Description  More Stuff   

              >> # 2       3   Description  More Stuff   

              >> # 3       3   Description  More Stuff   

              >> # 4       3   Description  More Stuff   

              >> # 5       3   Description  More Stuff   

              >> # 6       3   Description  More Stuff   

              1234        13   Description  More Stuff   

              >> # 2       8   Description  More Stuff   

              >> # 3       6   Description  More Stuff   

              >> # 4       4   Description  More Stuff   

              >> # 5       1   Description  More Stuff   

              >> # 6       0   Description  More Stuff   

               

               

              and so on.

               

              the first row, that has the partno in it, has the

              contains the info for one of the locations, loc = 1.  the next column is quantity on hand for that location.  I was trying to do an append but when trying get just the part number could not differentiate the that row from the other rows.

              The part number can have numbers or letters. Any Ideas would be helpful.

              • trapping
                MindQuest001 _

                Looked at it again, and that is not going to work. the problem is the data that I need to convert.

                 

                WT909        4   Description  More Stuff   

                >> # 2       3   Description  More Stuff   

                >> # 3       3   Description  More Stuff   

                >> # 4       3   Description  More Stuff   

                >> # 5       3   Description  More Stuff   

                >> # 6       3   Description  More Stuff   

                 

                and so on.

                 

                the first row, that has the partno in it, has the

                contains the info for one of the locations, loc = 1.  the next column is quantity on hand for that location.  I was trying to do an append but when trying get just the part number could not differentiate the that row from the other rows.

                The part number can have numbers or letters. Any Ideas would be helpful.

                • trapping
                  MindQuest001 _

                  Looked at it again, and that is not going to work. the problem is the data that I need to convert.  I am trying to convert an Inventory table from one system to another.  basically 6 locations, for each part there are 6 locations with qoh.  what I get in output is

                   

                  WT909        4   Description  More Stuff   

                  >> # 2       3   Description  More Stuff   

                  >> # 3       3   Description  More Stuff   

                  >> # 4       3   Description  More Stuff   

                  >> # 5       3   Description  More Stuff   

                  >> # 6       3   Description  More Stuff   

                   

                  and so on.

                   

                  the first row, that has the partno in it, has the

                  contains the info for one of the locations, loc = 1.  the next column is quantity on hand for that location.  I was trying to do an append but when trying get just the part number could not differentiate the that row from the other rows.

                  The part number can have numbers or letters. Any Ideas would be helpful.

                  • trapping
                    Grant Perkins

                    Originally posted by MindQuest001:

                    Got a simple question.  I've got an issue where it would be much easier to trap on what the character is not rather that what it is.  for example, got a report that I want to exclude all the lines that start with '>>', I've tried several other things and if this is posible it would be great.

                     

                    Thanks /b[/quote]I agree with Bruce's solution and that is what I would do UNLESS the report was huge and the number of lines you did NOT want to select was a high proportion of the total. That situation might result in some system performance or similar issues whch could be eliminated by changing the input file before processing.

                     

                    I might be possible to deal with that by pre-processing the file, using thr MSRP utility perhaps, to change the lines in some way that allowed selection of only the lines required.

                     

                    For example if >> were changed to 2 (or more?) spaces it may be that you could then select the lines you want based on  them having any character at the start of the line.

                     

                    Or possibly you could use a an editor script to delete all lines starting with >> .

                     

                    That said, it the select and filter method works I would go with it.

                     

                    Grant

                    • trapping
                      Grant Perkins

                      OK.

                       

                      I would see the detail lines as the location/wty values, trapped according to a numeric for qty and character positions for description and whatever else is on the line.

                       

                      The partno is an append which requires a trap that will exclude the >> characters.

                       

                      For example of all real partno's start with at least 3 chars, 3 non-blank chars at the beginning of the row would exclude ">> ".

                       

                      That sort of thing.

                       

                      If that proves difficult, which it might, maybe revert to the changing of > to spaces which I would certainly expect to solve the problem.

                       

                      I hope this helps.

                       

                       

                      Grant

                       

                      Originally posted by MindQuest001:

                      Looked at it again, and that is not going to work. the problem is the data that I need to convert.

                       

                      WT909        4   Description  More Stuff   

                      >> # 2       3   Description  More Stuff   

                      >> # 3       3   Description  More Stuff   

                      >> # 4       3   Description  More Stuff   

                      >> # 5       3   Description  More Stuff   

                      >> # 6       3   Description  More Stuff   

                       

                      and so on.

                       

                      the first row, that has the partno in it, has the

                      contains the info for one of the locations, loc = 1.  the next column is quantity on hand for that location.  I was trying to do an append but when trying get just the part number could not differentiate the that row from the other rows.

                      The part number can have numbers or letters. Any Ideas would be helpful. /b[/quote]

                      • trapping
                        MindQuest001 _

                        Sorry for the multiple posts, showing error when I tried to submit.  anyway.  I did replace the >> characters with spaces.  worked fine.  but I manually did it using an editor that did not mess up the formatting.  very interested in MSRP but cannot find any real documentation on how to use it.  I would love to find a commandline program that I could use.

                        • trapping
                          Grant Perkins

                          You could also do this using a 2 stage Monarch process ...

                           

                          1st pass selects every line entirely then creates a new calculated field for the whole line with an "IF" based translation (or another function such as STUFF for example if you have V7) to replace the chevrons with spaces. Print the new field as a report and then run your current model against the new file. All possible in a single batch file.

                           

                          MSRP makes more sense though.

                           

                          You can delete any posts you created by the way. As I had to earlier for the same reasons you ended up with duplicates! There is a check box in the black bar above the text entry box when in edit mode.

                           

                          Grant

                           

                            Originally posted by MindQuest001:

                          Sorry for the multiple posts, showing error when I tried to submit.  anyway.  I did replace the >> characters with spaces.  worked fine.  but I manually did it using an editor that did not mess up the formatting.  very interested in MSRP but cannot find any real documentation on how to use it.  I would love to find a commandline program that I could use. /b[/quote]