Running a Concordance Application

<< Click to Display Table of Contents >>

Navigation:  Concordance Programming Fundamentals > Working with the Concordance Development Environment >

Running a Concordance Application

Once you have created a Concordance .CPL file, you can run your script from within Concordance, or else run the optimized .CPT file from the command line.

When Concordance has finished running a program for the first time, it saves an optimized version of the file as a .CPT file. The next time you run the program, Concordance will run the .CPT file if it has a date and time later than the CPL file. A .CPT file runs faster than a CPL file, and can be run from the command line like a CPL file. However, they cannot be edited or modified with a text editor.

Note that scripts work on your current active query. Therefore, be sure to set up searches accordingly. Alternately, you can resort your database records by going to the Standard toolbar, and clicking the All button.

To execute a CPL script from within Concordance

1.Open Concordance.

2.If necessary, open the database and query you wish to execute the application on.

i.Unless specified otherwise using code, Concordance uses the current query as the target for a CPL application. For information on how to programmatically access multiple databases, see Opening and Closing a Database.

3.From the File menu, select Begin Program.

4.In the Open dialog, select the CPL you wish to run, and then select OK.

To execute a CPL file from the command line

1.Confirm that you have run the .CPL script at least once from within the Concordance UI.

i.As stated above, you must first run the script, after which Concordance creates the .CPT file. The .CPT file allows you to run the script from the command line.

2.On the command line, type the path of Concordance as you would normally, and then include the full path and name of the .CPT file.