Since the answer of Rupert Rybka directly answers the original poster's question, I am going to expand on the comment of Thomas Andrews and provide an Inclusion-Exclusion answer.
See this article for an
introduction to Inclusion-Exclusion.
Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula.
Following the syntax in the 2nd link above, let $~S~$ denote the collection of all 9 character strings that contain 3 A's, 3 B's, and 3 C's.
For $~k \in \{1,2,\cdots,7\},~$ let $~S_k~$ denote the subset of $~S~$ that specifically contains the sequence ABC, starting in position $~k.~$ For example an element in $~S_1~$ would look like
A B C - - - - - -
where the string might or might not contain the sequence A B C after position 3.
Then, the desired enumeration is
$$| ~S ~| - | ~S_1 \cup S_2 \cup \cdots \cup S_7 ~|. \tag1 $$
Let $~T_0~$ denote $~| ~S ~|.$
Let $~T_1~$ denote $\displaystyle \sum_{1 \leq i_1 \leq 7} | ~S_{i_1} ~|.$
That is, $~T_1~$ represents the sum of $~\displaystyle \binom{7}{1} ~$ terms.
For $~r \in \{2,3,\cdots,7\},~$
let $~T_r~$ denote $\displaystyle \sum_{1 \leq i_1 < i_2 < \cdots < i_r \leq 7} | ~S_{i_1} \cap S_{i_2} \cap \cdots \cap S_{i_r} ~|.$
That is, $~T_r~$ represents the sum of $~\displaystyle \binom{7}{r} ~$ terms.
Then, in accordance with Inclusion-Exclusion theory, the computation in (1) above is equivalent to :
$$\sum_{r=0}^7 (-1)^r T_r.$$
So, the entire problem has been reduced to computing each of $~T_0, T_1, \cdots, T_r.$
As it turns out, this will be much easier than it looks.
$~T_0,~$ which denotes $~|S|~$ equals
$$\binom{9}{3} \times \binom{6}{3} \times \binom{3}{3} = 1680.$$
By considerations of symmetry,
$$T_1 = 7 \times | ~S_1 ~| = 7 \times \binom{6}{2} \times \binom{4}{2} \times \binom{2}{2} = 630.$$
That is, in $~S_1,~$ with A B C starting in position 1, from position 4 on, there are 2 A's, 2 B's, and 2 C's to be distributed.
At this point, I am going to postpone the computation of $~T_2,~$ which represents the most challenging computation in the problem. Instead, I will now compute $~T_3, T_4, \cdots, T_7.~$
Then, in the next section, I will use a special method to compute $~T_2,~$ and in the final section, I will complete the problem.
There is only one way that you can have 3 of the sets $~S_1, S_2, \cdots, S_7~$ intersect. That is with the string that specifically looks like
A B C A B C A B C
which represents $~S_1 \cap S_4 \cap S_7.$
So,
$$T_3 = 1.$$
By similar analysis, it is impossible to have a 9 character string that represents the intersections of $~4~$ or more of the $~S_1, ~S_2, ~\cdots, ~S_7 ~$ subsets.
Therefore,
$$0 = T_4 = T_5 = T_6 = T_7.$$
$\underline{\text{Computation of} ~T_2}$
$~T_2~$ could be computed manually. I prefer to do it analytically, because the corresponding analysis will be generally useful.
As illustrative examples, consider the following tableaus
Tableau-1 : - - i-1 - - i-2 -
Tableau-2 : i-1 - - i-2 - - -
In Tableau-1 above, $~i_1~$ and $~i_2~$ are placed specifically in positions $~3~$ and $~6.~$ This specific tableau represents the $~S_3 \cap S_6~$ intersection.
In Tableau-1, the placement of $~i_1~$ and $~i_2~$ create $~3~$ islands: the island before $~i_1;~$ the island after $~i_1;~$ and the island after $~i_2.$ Let $~x_1, x_2, x_3,~$ denote the respective size of each of these islands, reading the islands from left to right.
Then, you have $~(x_1,x_2,x_3) = (2,2,1).~$
Now consider Tableau-2, which represents $~S_1 \cap S_4.$
The $~3~$ islands that it creates are $~(x_1,x_2,x_3) = (0,2,3).~$
Let $~N~$ denote the number of possible $~S_{i_1} \cap S_{i_2}~$ intersections, that are consistent with the constraints of the problem.
Then,
$$T_2 = N \times \binom{3}{1} \times \binom{2}{1} \times \binom{1}{1} = 6N.$$
Stars and Bars theory can be used to compute $~N.$ For Stars and Bars theory, see
this article and
this article.
Each intersection represented by one of the terms used in the computation of $~T_2~$ is uniquely identified by its corresponding ordered triple $~(x_1, x_2, x_3).~$
$~N~$ will equal the number of solutions to
$~x_1 + x_2 + x_3 = 7 - 2 = 5.~$
That is, there are $~7~$ positions, with $~2~$ of the positions taken by $~i_1~$ and $~i_2.$
$~x_1, x_3 \in \Bbb{Z_{\geq 0}}.$
$~x_2 \in \Bbb{Z_{\geq 2}}.$
The idea is that since $~S_{i_1}~$ represents a $~3~$ character string, the position of $~i_2~$ must be greater than or equal to $~(i_1 + 3).~$ This implies that $~x_2~$ must be $~\geq 2.$
Further, having $~x_1 = 0 ~$ merely represents that $~i_1 = 1,~$ which is perfectly acceptable. Similarly, having $~x_3 = 0 ~$ merely represents that $~i_2 = 7,~$ which is also perfectly acceptable.
Basic Stars and Bars theory requires that each of the variables be an element in $~\Bbb{Z_{\geq 0}}.~$
This is easily achievable, via $~y_2 = x_2 - 2 \implies y_2 \in \Bbb{Z_{\geq 0}}.$
So, the enumeration of $~N~$ has been transformed into enumerating the number of solutions to
$x_1 + y_2 + x_3 = (7 - 2) - 2 = 3.$
$x_1,x_3 \in \Bbb{Z_{\geq 0}}.$
$y_2 \in \Bbb{Z_{\geq 0}}.$
By Stars and Bars theory:
$$N = \binom{3 + [3-1]}{3-1} = \binom{5}{2} = 10.$$
Therefore,
$$T_2 = 6N = 60.$$
Note
The (alternative) manual computation of $~N~$ would be to reason that for each $~i_1 \in \{1,2,3,4\},~$ there are $~(5 - i_1)~$ compatible positions for $~i_2.~$
Therefore, $~\displaystyle N = \sum_{i_1 = 1}^4 (5 - i_1) = 10.$
$\underline{\text{Completion of the Problem}}$
The desired enumeration is
$$\sum_{r=0}^{7} (-1)^r T_r$$
$$= ( ~T_0 + T_2 ~) - ( ~T_1 + T_3 ~)$$
$$= ( ~1680 + 60 ~) - ( ~630 + 1) = 1109.$$