No announcement yet.

Conditional Scripting..

  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditional Scripting..

    Hello all..

    I have just started using BC3 as part or my Automated testing process and have already hit a wall..

    I am trying to setup a command line compare of 2 files, and if successful, I will make it a directory compare.

    Here is my dilemma, the 2 files that are being compared are both data extracts, so they follow a particular layout..

    So the my layout is the following ( all in character offsets ):

    01-16 - are the transaction reference number
    16-18 - are the transaction code
    19-33 - are the account number
    34-xx - Variable data based on the transaction code

    So my dilemma is how can I script this so that I can change the rules based on the transaction code, so that I filter out as many like items as possible.

    And the second part is how to do this via command line scripting?



  • #2

    Do these files have a specific extension? If so, you can create a File Format which has grammars defined to match on 1-16, 17-18, etc, for each. These grammar names can be important or unimportant by setting the default Importance on the Home screen's Edit Session Defaults. Unfortunately, we cannot change these settings based on what is found in columns 17-18.

    We do not have command line parameters for switching grammar definitions or importance, but all of our settings are stored as .xml. You could parse the .xml and change it as part of an overall command line scripting process, which both changes the .xml then calls the comparison. Using a Portable Install specific for this script might help, since it would store all the .xml settings files in the same directory as the executable. However, it might be easier if there were a way to setup the defaults to use specific file formats for specific file names/extensions. If you could go into more detail on how your data needs to be compared, we could help give some tips as to how to set that up.

    For general Unimportance setup, please see this article:
    I would recommend setting up the graphical interface first, to see if we can configure that to meet your needs.
    Aaron P Scooter Software


    • #3
      Thanks for the reply Aaron.. These files don't have a specific file extension, but that can easily be fix before the testing is done..

      I will investigate setting up the grammar options after I write the java shell code..