6 Replies Latest reply: May 15, 2014 9:51 AM by Data Kruncher RSS

    BAI File 16 tag detail record with 88 continuation record

    MorseB _

      Is there a way within Monarch to create a model for a BAI file where some of the 16 tag detail records have a following 88 tag which continues the data?

       

       

      16,174,3000,,2239696275387,98130221/

      88,98130221

      16,932,228600,,,,/

        • BAI File 16 tag detail record with 88 continuation record
          Mike Urbonas

          Beth, thanks for your post.

           

          (1) What is a BAI file?  (What does BAI stand for)

           

          (2) Do I understand correctly that the presense of the value "88" means the end of that record?

           

          (3) How does the BAI file differentiate between the presence of an 88 meaning 'end of record' versus the number 88 appearing as an actual data value?

          • BAI File 16 tag detail record with 88 continuation record
            MorseB _

            Mike,

             

            88 tag means a continuation of the previous record.  The previous record could a tag that begins with 01, 02, 03, 16.  I would only want to append when the prior record tag was a 16.

             

            BAI means Bank Administration Institute.

             

            I would be able to distinguish the 88 I am looking for as it would be the first two positions with a comma following.

             

            Thank you.

            • BAI File 16 tag detail record with 88 continuation record
              Mike Urbonas

              Beth, your file looks like a CSV (comma separated variable) file, except sometimes a line of data (ie, one record) continues to the next line, preceded by: 88.

               

              It seems to me that it would be ideal if you could use the Monarch Utility to remove each occurrence of a line feed followed by 88.  Then each record is on one line and then the file can be opened natively as a CSV file by V8 Pro (or mined with Monarch Standard if need be).

               

              This can be done using the Monarch Utility found in Monarch V8 (also V7).

               

              V8 users can click on the Windows Start button, then All Programs -> Monarch -> Monarch Utility.

               

              Then click on the last button on the Monarch Utility screen, "Prepare files for use with Monarch."  The next screen allows you to specify the location and name(s) of file(s) Monarch Utility should prepare.

               

              Then enter the string to replace as shown in the next message below, and replace it with nothing.

               

              Give that a try (saving your original file elsewhere as backup).  I will provide more info on how to enter various characters and special keys as provided above.

               

              [size="1"][ July 07, 2006, 10:05 AM: Message edited by: Mike Urbonas ][/size]

              • BAI File 16 tag detail record with 88 continuation record
                Mike Urbonas

                Beth, I think you may want to enter this as the string to search for using Monarch Utility, to be replaced with nothing (leave that field in Monarch Utility blank):

                 

                /x2F/x0d/x0A88,

                 

                /x2F means forward slash ' / '

                /x0d means "carriage return"

                /x0A means "line feed" (these two 'characters' removed will pull up the next row of the file into the previous row)

                and...

                88, is then included to remove the 88 and the following comma which indicates the record continues to a second row.

                 

                I think you want to remove the slash at the end of the row before the 88 appears on the next row.

                 

                Because we are removing a forward slash and removing "carriage return"-"line feed" characters it is necessary to express the string in "hexadecimal form."  This is far less complicated than it sounds.  For more information, open the Monarch Utility help file (simply click Help button in Monarch Utility and do a search for "Using Wildcards" for search and replace of strings.

                 

                Once the above is done, each record should appear in full in its own single row, and the file should then be directly readable by Monarch Pro as a CSV file.

                 

                Mike

                 

                [size="1"][ July 07, 2006, 10:06 AM: Message edited by: Mike Urbonas ][/size]

                • BAI File 16 tag detail record with 88 continuation record
                  MorseB _

                  Mike,

                   

                  Is there a way for me to learn more about the utility function?  Can code be written so that it does not have to be done manually.  Such as Microsoft Access VBA which I use to execute Monarch, read reports, select models, filters and export tables and summaries automatically.

                   

                  Is there to only apply to 88 tags that follow a 16 tag?

                   

                  Thank you.

                  • BAI File 16 tag detail record with 88 continuation record
                    Data Kruncher

                    Beth,

                     

                    I hope you won't mind if I jump in.

                     

                    As to controlling the Monarch Utility via automation, the answer is Yes and No. No, I don't believe you can program the Utility the way you can Monarch in terms of an exposed object model with VBA, but yes, you certainly can pass it parameters on the command line to automate search and replace functions.

                     

                    Please see the Monarch Utility help file for help on the command line for much more information. In the Help window, click the Search tab, and enter "command line".

                     

                    I may be mistaken but I don't think that with the Monarch Utility alone you'll be able to check for lines which begin with 16 which appear immediately after lines which begin with 88. This would even be a challenge within Monarch as one record cannot reference values in another.

                     

                    If you're comfortable with VBA however, you might want to consider scanning the report file programmatically, checking the lines and exporting only the lines you need to a separate output file which would then be processed by Monarch.

                     

                    Hope this helps,

                    Kruncher