Home

 

Examples

 

Technical

 TextMaestro

 

2003 TextMaestro Technologies

 

  Examples

  Example 1

  Example 2

  Example 3

  Example 4

  Example 5

  Example 6

  Example 7

  Example 8

  Example 9

  Example 10

  Example 11

  Example 12

  Example 13

  Example 14

  Example 15

  Example 16

  Example 17

  Example 18

  Example 19

  Example 20

  Example 21

 

 

Example 22: Cross Listings

You can perform Cross in two distinct ways:

(1) Cross on Input and Output window text

(2) Cross on a set of files

Let us first explain the key concept of Cross. Suppose you have two listings:

 

List 1

List 2

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

file_1

file_2

file_3

file_4

file_5

file_6

file_trip

file_8

file_9

file_a

file_1

file_2

file_3

file_lalu

file_5

file_6

file_duba

file_7

file_8

file_batu

file_9

file_a

 

Note that some files belong to List 1 only, some to List 2 only, and some to both List 1 and List 2. In picture:

Cross will make a report where you will see a break-down of above information.

 

(1) Cross on Input and Output window text:                        Top

Click on Expand button (Ctrl+E) to open Session toolbar. Click on Diff and Merge button (Alt+D) from the Session toolbar. The following dialog will appear where you select Cross tab.

 

 

This is used for a set of files. We will visit this in next section.

 

This is used to cross texts found in Input and Output window.

 

This is what we will use here.

Place the following text on Input window and Output window as shown on the left:

 

 

Input window

Output window

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

file_1

file_2

file_3

file_4

file_5

file_6

file_trip

file_8

file_9

file_a

file_1

file_2

file_3

file_lalu

file_5

file_6

file_duba

file_7

file_8

file_batu

file_9

file_a

 

Now if we hit the button from the File Diff Manager, a report will be displayed on the Message window as shown below.

 

 

This report contains 3 things:

a. List of items that were found exclusively in Input window (if any).

b. List of items that were found exclusively in Output window (if any).

c. List of items that were found in both Input Window and Output window (if any).

 

Here is the output on Message window:

In text format:

Message window text:

Files found exclusively in Basket-1: Input text (2)

-----------------------------------------------

    file_4

    file_trip

Total 2 items.

 

Files found exclusively in Basket-2: Output text (4)

------------------------------------------------

    file_7

    file_batu

    file_duba

    file_lalu

Total 4 items.

 

Files common to all selected baskets:  (8)

--------------------------------------

    file_1

    file_2

    file_3

    file_5

    file_6

    file_8

    file_9

    file_a

Total 8 items.

 

 

Input window text has two items that are not in Output window. Output window text has 4 items that are not in Input window. And finally, there are 8 items which are both in Input and Output window.

 

 

(2) Cross on a set of files:                        Top

 

Suppose the current basket has the following files. Each file contains a list of items. We would like to execute a Cross on these four files.

 

Also suppose the contents of the four files are what shown below:

 

 

 

file 1

file 2

file 3

file 4

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

item_1

item_2

item_3

item_4

item_5

item_6

item_AAA

item_8

item_9

item_a

item_b

item_1

item_2

item_3

item_PPP

item_5

item_6

item_7

item_8

item_9

item_a

item_1

item_2

item_3

item_PPP

item_5

item_6

item_QQQ

item_7

item_8

item_RRR

item_9

item_a

item_1

item_2

item_3

item_4

item_5

item_6

item_AAA

item_8

item_9

item_BIG

Click on Expand button (Ctrl+E) to open Session toolbar.

Select the files of interest if they are not selected.

Click on Diff and Merge button (Alt+D) from the Session toolbar. The dialog on left will appear where you keep Show Delete trail checked (optional).

 

Now click on Cross listings of selected files button.

 

A report will be created and placed on the Input window as shown below:

In text format:

Input window text:

Files found exclusively in Basket-1: cross\file_1.txt (1)

-----------------------------------------------------

    item_b

Total 1 item.

 

Files found exclusively in Basket-3: cross\file_3.txt (2)

-----------------------------------------------------

    item_QQQ

    item_RRR

Total 2 items.

 

Files found exclusively in Basket-4: cross\file_4.txt (1)

-----------------------------------------------------

    item_BIG

Total 1 item.

 

Tracing addition and deletion of files:

---------------------------------------

0: Absent,   1: Present

                B1   B2   B3   B4   

                -----------------

    item_4      1    0    0    1    

    item_7      0    1    1    0    

    item_AAA    1    0    0    1    

    item_BIG    0    0    0    1    

    item_PPP    0    1    1    0    

    item_QQQ    0    0    1    0    

    item_RRR    0    0    1    0    

    item_a      1    1    1    0    

    item_b      1    0    0    0    

 

Files common to all selected baskets:  (7)

--------------------------------------

    item_1

    item_2

    item_3

    item_5

    item_6

    item_8

    item_9

Total 7 items.

 

Note that sometimes you may want to suppress the addition and deletion trail. If so, you want to un-check Show Delete trail.

Top