# CFEX – Rules to pass CFEX for a MOD

**Compiled:** 30 November 2026
**Sources:** Jira (projects CFEX, SNSPROC, SRUD, SPACEVAL, STATUSRVW, BRSISSPCAP, DATALIB), Confluence (pages listed in section 13), the SSD specification *"Specification for actions that should be done by CFEX v9.1_final 2022 0909.docx"* (local copy in `BR Tools\CFEX\`), and the SNS table definitions of `e_as_stn` and `e_srvcls` (SQL `SpaceNetworkSystem`).

**Status labels used in this file**

| Label | Meaning |
|---|---|
| **[Confirmed]** | Written by the CFEX developers (Fabrice Evangelisti, Olivier Evrard) in Jira or Confluence, or in the SSD specification, and/or applied on real cases |
| **[Case]** | Established on one real case only |
| **[Spec]** | From the 2022 SSD specification for CFEX v9.1 (non-GSO only). The implemented message text can differ |
| **[Unverified]** | Logical consequence of the rules above, not found in any source and not tested |

---

## 1. What CFEX does

| Stage | Applies to | What it does |
|---|---|---|
| **CFEX 1** | ADD and MOD | Checks the database: no other pending ADD or MOD for the same notice / TARGET |
| **Compare (CFEX 2)** | MOD only | Compares MOD with TARGET, checks the action codes and comparison flags |
| **Merge** | MOD only | Builds the MERGE notice at `ntc_id + 200000000` (`1xxxxxxxx` → `3xxxxxxxx`) |

- A MOD is a **delta**, not a full network. It carries only what changes, each record with an action code. Records that the MOD does not mention are copied from TARGET into MERGE unchanged. **[Confirmed]**
- MERGE = records of the MOD (A, and M laid over the TARGET record) + TARGET records not in the MOD. S records stay in MERGE with `act_code = S` and are physically removed at USMR. **[Confirmed]**
- An M record is sparse: a null field in the MOD means "keep the TARGET value". For groups, data missing in the MOD is taken from TARGET, **except for listed fields**. **[Confirmed]** (CFEX-97, CFEX-37)
- CFEX failure puts the MOD in **status 31**. **[Confirmed]**
- At USMR, a normal MOD is replaced by the MERGE (status 50, renumbered to the TARGET ids). An internal MOD (`f_int_ext = I`) patches the TARGET in place. **[Confirmed]**

### Action codes

| act_code | Meaning |
|---|---|
| A | Add a new record (must **not** exist in TARGET) |
| M | Modify a TARGET record (must exist in TARGET) |
| S | Suppress a TARGET record (must exist in TARGET) |
| R | Replace (beam / antenna level, including rename with `beam_old`) |
| blank / null | No action. Context record (for example, a group under a modified beam) |

### Join keys between MOD and TARGET **[Confirmed]**

| Level | Key |
|---|---|
| Notice | `com_el.tgt_ntc_id` |
| Beam | `emi_rcp` + `beam_name` (`beam_old` for a renamed beam) |
| Group | MOD `grp.tgt_grp_id` = TARGET `grp.grp_id` |
| Orbit | `orb_id` |
| Phase | `orb_id` + `orb_sat_id` |
| Associated earth station | Group pair + `stn_name` **and** the same `seq_no` (section 5) |

If a key is wrong or missing, CFEX classifies a modify as an add, or orphans the record.

---

## 2. Before you run CFEX: notice status and pending transactions

1. **CFEX 1 blocks the MOD (message H)** if an earlier-received notice on the same TARGET is in a status other than **19, 27, 53, 54**. Close or move the earlier MOD first. **[Confirmed]** (SRUD-46, 2026-11-24)
2. Notices in status **53 / 54** do not block CFEX. **[Confirmed]** (CFEX-29)
3. A SpaceCap **Data Amendment** on a MOD below status 50 deletes its MERGE and resets the MOD to status 05. Then run CFEX again. **[Confirmed]** (SRUD-46)
4. Do not restore an old deleted MERGE: its group ids can collide with the MERGE of the next MOD. **[Case]** (SRUD-46)
5. Withdrawals (`f_int_ext = W` or `Z`) must be a suppression; otherwise CFEX rejects them. **[Confirmed]**
6. **Internal MODs (`f_int_ext = I` or `R`) must not contain a basic change** on any record (station, group, beam, orbit, ngma, strap). Otherwise CFEX stops with a fatal error and the notice goes to status 31. **[Confirmed]**
7. Known gap: for an ADD of a CR/C, CFEX 1 returned OK although an expired coordination of the same network was still in status 50 (SE for CSS Case 21). Check this by hand. **[Case]**
8. Do not use CFEX during USMR (Thursday of the IFIC week). **[Confirmed]**

---

## 3. Beams

1. **M beam must exist in TARGET.** A new beam is **A**, and its groups have a **blank** action code. **[Confirmed]** (SRUD-46: beam S1DL had M but did not exist in TARGET → change to A, with blank act_code on its groups)
2. **Suppressed beam (S): remove all its groups and their associated earth stations from the MOD.** **[Confirmed]** (Confluence "Improved Capture of MOD Transactions": *"CFEX forces us to remove earth associated stations and groups from SUP beam"*; spec: *"clone this beam with action code S (all groups of this beam should be removed)"*)
3. **Do not include unmodified beams** in the MOD. Delete them if they cause a CFEX stop. SpaceCap flags all beams and groups as M, so check them. **[Confirmed]** (CFEX-95, 2022)
4. Renamed beam: use `beam_old` (action code R). **[Confirmed]**
5. A non-null beam attachment in the MOD is treated as a **basic change** and clears findings. **[Confirmed]** (CFEX-97, 2023)
6. `s_beam.attch_pfd_steer` is set to NULL in MERGE if `f_pfd_steer_default = 'Y'`. **[Confirmed]** (SNSPROC-1)

---

## 4. Groups

1. **M group**: `grp.tgt_grp_id` must point to the TARGET group. **[Confirmed]**
2. **A group** under an existing beam: no `tgt_grp_id`. A group under a **new** beam has a **blank** act_code (the A is on `s_beam`). **[Confirmed]**
3. Group fields missing in the MOD are copied from TARGET, except listed fields. **[Confirmed]** (CFEX-37, CFEX-97)
4. `d_rcv_start` of an M group in the MOD is copied onto the merged group (the exclusion is commented out in `CfexMerge.cs`). Check the dates after CFEX. **[Confirmed]** (REGDATES page, CARABINER, 2026-09-12)
5. **11.43A modification**: check after CFEX that `d_rcv_start` and `f_biu` were not copied from TARGET (fixed in 2023, CFEX-37). **[Confirmed]**
6. `fdg_ref` in MERGE = TARGET + MOD. **[Confirmed]** (CFEX-30)

---

## 5. Associated earth stations (`e_as_stn`, `e_srvcls`)

### 5.1 Table keys **[Confirmed]** (SNS table definitions)

| Table | Primary key | Note |
|---|---|---|
| `e_as_stn` | (`grp_id`, `seq_no`) | Has `act_code`, `stn_old`, `f_cmp_rec` (comparison flag), `f_e_change` |
| `e_srvcls` | (`grp_id`, `seq_e_as`, `seq_no`) – unique index `UCI_e_srvcls` | `seq_e_as` = `e_as_stn.seq_no`; `seq_no` = order of the class-of-station rows inside that station |

Note: Olivier Evrard wrote in CFEX-66 (2025-08-26): *"What we would really need is an action code at e_as_stn level."* The column `e_as_stn.act_code` exists, but CFEX does not identify an existing station by its action code alone: it needs the **same `seq_no`** as in TARGET. Therefore always set both the action code and the TARGET `seq_no`.

### 5.2 Option "Replace all earth stations" = **No** (normal case)

**Rule 1 – Modify an existing station** (same `stn_name` in the corresponding TARGET group)

- `e_as_stn.seq_no` in the MOD = `seq_no` in TARGET. **[Confirmed]** (CFEX-3 2018, SNSPROC-22 2019, CFEX-95 2022, CFEX-66 2025)
- `e_as_stn.act_code = M`. Do not use A for an existing station. **[Case]** (SVALBARD, 30 Nov 2026; CFEX-3)
- All its `e_srvcls.seq_e_as` = that `seq_no`. **[Confirmed]**
- Do not blank fields that exist in TARGET. Example: removing `ctry` was *"considered as a too big change for cfex"*. Workaround used: keep `ctry` in the MOD, run CFEX, then delete it in MERGE. **[Confirmed]** (CFEX-3, 2018)

**Rule 2 – Change of station name or station type = suppress + add, not modify**

- A change of `stn_name`, or a change of type (for example typical → specific), cannot be an M.
- Capture it as: the TARGET station with `act_code = S` (TARGET `seq_no`) + the new station with `act_code = A` (new `seq_no`). **[Confirmed]** (CFEX-13; CFEX-94 2021: *"Changes of earth station type in a modification must be captured as removal of the original station and addition of new ones"*; CFEX-95 2022: *"a change of name or type requires suppress and add"*)
- `e_as_stn.stn_old` exists, but CFEX does not use it for a rename (CFEX-13). **[Confirmed]**

**Rule 3 – Existing station without changes**

- Remove the station from `e_as_stn` and all its `e_srvcls` rows from the MOD. CFEX keeps the TARGET station in MERGE. **[Case]** (SVALBARD, 30 Nov 2026; TARGET stations are carried into MERGE since the 2017 fix, CFEX-92)
- Keeping it in the MOD with the TARGET `seq_no` and a blank action code: **[Unverified]**. Removal is the tested method.

**Rule 4 – Add a new station**

- `e_as_stn.act_code = A`.
- `seq_no` must not be used by any station of the same group in TARGET or in the MOD. Example of a safe method used by the developers: TARGET max `seq_no` + 1, or + 50. **[Confirmed]** (SNSPROC-22: MOD `seq_no` + 50)
- All its `e_srvcls.seq_e_as` = that `seq_no`.
- **`stn_name` must be unique within the group.** Duplicate stations (same name, type and country) stopped CFEX. The same name in different groups is allowed. **[Confirmed]** (CFEX-95 2022; meeting 2026-07-31)

**Rule 5 – Suppress an existing station**

- `e_as_stn.act_code = S`, `seq_no` = TARGET `seq_no`. **[Unverified]** (follows from Rules 1 and 4; S on stations works when the replace option is off, see SRUD-26)
- Do not confuse "suppress from TARGET" (S in the MOD) with "remove an unchanged station from the MOD" (Rule 3).

**Rule 6 – Stations under a suppressed beam**

- Remove them, together with the groups (section 3, item 2). **[Confirmed]**

### 5.3 Option "Replace all earth stations" = **Yes**

- CFEX replaces the TARGET stations with the MOD stations and **ignores the action codes**. **[Confirmed]** (SRUD-26, 2026-07)
- Therefore a station with `act_code = S` in the MOD **stays** in the result. To suppress a station with this option, **omit it** from the MOD. **[Confirmed]** (SRUD-26)
- The MOD must contain **all** the stations to keep: an unchanged station removed from the MOD is lost. **[Unverified]**
- This option is the alternative fix for the seq_no / duplicate-key problem. **[Confirmed]** (CFEX-66: *"Check the CFEX option"*; CFEX-95)
- Whether the option applies to all groups of the notice or only to the modified groups: **[Unverified]**.

### 5.4 Referential integrity (always)

- `e_as_stn.grp_id = e_srvcls.grp_id` and `e_as_stn.seq_no = e_srvcls.seq_e_as`.
- When you change `e_as_stn.seq_no`, change all its `e_srvcls.seq_e_as`. **[Confirmed]** (CFEX-66: *"switch sequence number 1 and 15 in e_as_stn and e_srv_cls"*; DATALIB-25: `seq_e_as` follows `seq_no` renumbering)
- Do not change `e_srvcls.seq_no` because `e_as_stn.seq_no` changed. It is an independent sequence inside the station. **[Confirmed]** (table key)
- When you remove an `e_as_stn` row, remove its `e_srvcls` rows.
- Every station in TARGET and in the MOD must have at least one `e_srvcls` row. Missing rows in TARGET stopped CFEX (they were added in TARGET). **[Confirmed]** (CFEX-95, 2022)

### 5.5 Real cases

| Case | Problem | Fix |
|---|---|---|
| HODOYOSHI 118500101 (2018, CFEX-3) | `CFEX2-invalid comparison flag or action code in Earth Assc. Stn record` for stations 1, 3, 4 | Renumber MOD `seq_no` = TARGET `seq_no`; `ctry` removal workaround |
| ELSA-D (2019, SNSPROC-22) | MOD `seq_no` did not correspond to TARGET | MOD `e_as_stn` and `e_srvcls` renumbered + 50; after CFEX, TARGET stations deleted from MERGE |
| 2025, CFEX-66 (merge 325644077) | `Cannot insert duplicate key row in object 'dbo.e_srvcls' with unique index 'UCI_e_srvcls'. The duplicate key value is (325644077, 15, 1)` – 14 new stations; the TARGET station kept in the MOD with `seq_no` 15 instead of 1 | Swap `seq_no` 1 and 15 in `e_as_stn` and `e_srvcls`, **or** use the "Replace all earth stations" option |
| USPWSA-T1TL 123545393 (2026, SRUD-26) | Stations with S stayed in the result | Cause: "Replace all earth stations" option selected → action codes ignored |
| SVALBARD – MOD 126500234, TARGET 123500124, beams SD1, XDN, SUP (30 Nov 2026) | SVALBARD existed in TARGET with `seq_no` 1; MOD had `seq_no` 5, `act_code` A → CFEX2 invalid action code. Changing A to M without the `seq_no` → duplicate key in `e_srvcls` | Modified: `act_code` M, `seq_no` 1, `e_srvcls.seq_e_as` 1. Unchanged: remove SVALBARD and its `e_srvcls` rows from the MOD |

---

## 6. Non-GSO orbits and phases (`ntc_type = N`) **[Spec]**

Source: SSD specification for CFEX v9.1 (2022). Implemented in 2023 (CFEX-97). Fatal = CFEX stops.

| # | Condition in the MOD | Result |
|---|---|---|
| O-1 | A orbit with an `orb_id` that exists in TARGET | Fatal: *"Action code A was wrongly set for the orbital plane no. [orb_id] in MOD"* |
| O-2 | M orbit with no `orb_id` in TARGET | Fatal: *"Action code M was wrongly set …"* |
| O-3 | M orbit; TARGET `orb_set_id` not null and different from the MOD | Fatal: *"Action code M was wrongly set …"* |
| O-4 | S orbit with no `orb_id` in TARGET | Fatal: *"Action code S was wrongly set …"* |
| O-5 | Orbit with null action code and no `orb_id` in TARGET | Fatal: *"There is no orbital plane no. [orb_id] in TARGET"* |
| O-6 | Orbit with null action code; a field (orbit or `phase_ang`) **differs** from TARGET | Fatal: set M on the orbit and clone all its beams and groups with M from TARGET |
| O-7 | Orbit with null action code; a field is **missing** in the MOD | Copied from TARGET, warning only |
| O-8 | M orbit; a TARGET beam linked to it is not in the MOD | Fatal: *"Action code M should be set for the beam … Kindly clone this beam and all groups of this beam with action code M from TARGET to MOD"* |
| O-9 | S orbit; a TARGET beam linked **only** to that orbit is not S in the MOD | Fatal: clone the beam with S and remove all its groups |
| O-10 | TARGET: `f_constell ≠ N`, `multi_config_type` null or M, and `orb_set_id` null on all orbits | Fatal: *"Information for multiple configurations was not captured in TARGET, kindly capture this information in TARGET and run CFEX again"* |

Other non-GSO behaviour **[Spec]**:

- `nbr_plane` in MERGE = TARGET `nbr_plane` + A orbits − S orbits.
- `ref_body` or `f_sdm` different from TARGET → TARGET fully replaced by the MOD (warning).
- `nbr_sat_td`, `sat_oper`, `ntc_commit` (QV), `c_pfd`, `f_epfd`, `f_pfd_lim`, `f_aes_char`: copied from TARGET if missing in the MOD and the related groups are not all suppressed.
- Orbits, phases and remaining orbit ids are **not renumbered** after a suppression. **[Confirmed]**
- MOD with only orbital changes: CFEX needs the related beams/groups (O-8, O-9).

Options for non-GSO **[Confirmed]**:

- **Replace NGSO tables** (`non_geo`, `orbit`, `orbit_lnk`, `phase`, `epfd_phase`, `epfd_param`) from the MOD, for non-basic orbit changes or corrections (CFEX-80, 2026; CFEX-91 option since 2015).
- A basic orbit change (number of satellites, planes, apogee, perigee, inclination) must clear findings and set findings-required on the beams/groups linked to that `orb_id` (fixed in CFEX-79, 2026).

---

## 7. Findings, cost recovery and the "Keep findings" option

| MERGE record | `f_fdg_reqd` / `f_cost_rec` |
|---|---|
| Beam A | Y / Y |
| Beam M | I / I |
| Group A, or group with blank code under a beam A | Y / Y |
| Group M | I / I |

**[Spec]**

- A basic change sets findings-required and **clears coordination provisions**. This is correct behaviour. **[Confirmed]** (CFEX-93)
- **Keep findings** option: if it is not selected on a MOD, the provisions (coordination requirements) of untouched groups are cleared in MERGE. **[Confirmed]** (CFEX-57, open: request for a fatal error when `provn` is empty)
- CFEX stops when findings must be updated but "Keep findings" was selected. **[Confirmed]** (CFEX-63)
- Internal MOD `I`: findings-required forced to null, no cost recovery, no WIC clearing. `R`: like external for findings and WIC. **[Confirmed]**

---

## 8. Other tables and known data losses – check after CFEX

| Item | What to check | Source |
|---|---|---|
| `orbit.apog_dist`, `perig_dist` (non-GSO) | Not empty in MERGE | CFEX-83 (fixed 2026-08) |
| `phase` | Present in MERGE when the MOD has phases and TARGET has none | CFEX-74 (fixed 2026-02) |
| `orbit_set` | Copied to MERGE | CFEX-78 (fixed) |
| `epfd_param` | Present in MERGE | CFEX-85 (fixed 2026-07) |
| `interf_poc` | Taken into account | CFEX-70 (fixed) |
| Group dates `d_rcv_start` / `d_reg_limit` | Not overwritten incorrectly (11.43A, CARABINER case) | CFEX-37, REGDATES 2026-09-12 |
| `grp.eirp_nom` removed in the MOD | Removal applied in MERGE | CFEX-65 (fixed) |
| `prov_desc` token `6.16` (AP30B / AP30B-ESIM Part B) | Not yet supported in the provision comparison | CFEX-96 (open) |
| Associated space stations (API MOD) | Present in MERGE | CFEX-27 (fixed 2021) |

---

## 9. Known CFEX messages

| Message | Usual cause | Fix |
|---|---|---|
| `CFEX2-invalid comparison flag or action code in Earth Assc. Stn record; Ntc ID, Grp ID and EAssStn ID: …` | Existing station with A; MOD `seq_no` ≠ TARGET `seq_no`; name or type changed with M; `ctry` removed | Section 5.2 |
| `Cannot insert duplicate key row in object 'dbo.e_srvcls' with unique index 'UCI_e_srvcls'. The duplicate key value is (grp_id, seq_e_as, seq_no)` | Existing station kept in the MOD with another `seq_no`; `seq_e_as` not updated | Rule 1 and 5.4, or "Replace all earth stations" |
| CFEX 1 message **H** | Earlier MOD on the same TARGET not in status 19, 27, 53, 54 | Section 2 |
| Fatal error on basic change, status 31 | Internal MOD (`I`/`R`) with a basic change | Section 2, item 6 |
| Orbit messages (O-1 to O-10) | Section 6 | Section 6 |

---

## 10. Pre-CFEX checklist

**Notice**
- [ ] `tgt_ntc_id` is the status-50 TARGET.
- [ ] No earlier MOD on the same TARGET in a status other than 19, 27, 53, 54.
- [ ] Internal MOD: no basic change.

**Beams and groups**
- [ ] Each M beam exists in TARGET (`emi_rcp` + `beam_name`); new beams are A with blank group codes.
- [ ] S beams have no groups and no associated earth stations.
- [ ] Unmodified beams and groups removed from the MOD.
- [ ] Each M group has `tgt_grp_id` = a TARGET `grp_id`.

**Associated earth stations** (option "Replace all earth stations" = No)
- [ ] Compare station names per MOD group / TARGET group.
- [ ] Modified station: `act_code` M and TARGET `seq_no`.
- [ ] Name or type changed: S (TARGET `seq_no`) + A (new `seq_no`).
- [ ] Unchanged station: removed with its `e_srvcls` rows.
- [ ] New station: `act_code` A, `seq_no` not used in TARGET or MOD, name unique in the group.
- [ ] No field of an existing station blanked (for example `ctry`).
- [ ] `e_srvcls.seq_e_as` = `e_as_stn.seq_no`; no orphan `e_srvcls` rows; no station without `e_srvcls`.
- [ ] No duplicate (`grp_id`, `seq_e_as`, `seq_no`).

**Non-GSO**
- [ ] Orbit action codes against TARGET `orb_id` (O-1 to O-5).
- [ ] Orbits without action code are identical to TARGET (O-6).
- [ ] All beams/groups linked to an M orbit cloned with M; beams linked only to an S orbit cloned with S, without groups.
- [ ] TARGET has multiple-configuration data if required (O-10).

**CFEX options**
- [ ] "Keep findings": selected if untouched groups must keep their provisions.
- [ ] "Replace all earth stations": only if the MOD contains the full station list; action codes are then ignored.
- [ ] "Replace NGSO tables": only for non-basic orbit corrections.

**After CFEX (MERGE `3xxxxxxxx`)**
- [ ] Earth stations: expected list per group, no S station left when the replace option was used.
- [ ] Section 8 items.
- [ ] Run Validation on the MERGE (it validates modified **and** inherited groups, SPACEVAL-428).

---

## 11. General principle

The MOD contains only the intended changes. Each record that changes an existing TARGET record keeps the TARGET key (`orb_id`, `emi_rcp` + `beam_name`, `tgt_grp_id`, `e_as_stn.seq_no`). Each new record has a new key that does not exist in TARGET. Dependent records keep referential integrity.

---

## 12. Open points

- Does CFEX accept an unchanged station left in the MOD with the TARGET `seq_no` and a blank action code? (Rule 3)
- S on an associated earth station: not tested on a real case with the replace option off. (Rule 5)
- Scope of the "Replace all earth stations" option (all groups or only modified groups). (5.3)
- CFEX-81: does CFEX use `phase.act_code`? (no answer recorded)
- CFEX-57 (open): fatal error when `provn` is empty and "Keep findings" not selected.

---

## 13. Sources

**Confluence**
- Understanding CFEX – CP/543916037
- How To BRSIS Cfex – SVAL/489979905; SE for CSS Case 21 – SVAL/491159555
- The different transactions Add, Mod, Sup – SP/9043972
- Improved Capture of MOD Transactions – BRSISSPCAP/2262236
- 2026-07-31 Meeting notes (associated earth station name unique in a group) – BRSISSPCAP/645660673
- API MOD suppressing and re-adding the same bands (CARABINER) – REGDATES/736231425

**Jira**
- Earth stations: CFEX-3, CFEX-13, CFEX-66, CFEX-92, CFEX-94, CFEX-95, SNSPROC-22, SRUD-26
- Notice / status: SRUD-46, CFEX-29, SPACECAP-157
- Orbits / non-GSO: CFEX-79, CFEX-80, CFEX-83, CFEX-74, CFEX-78, CFEX-91, CFEX-97, STATUSRVW-14
- Findings: CFEX-57, CFEX-59, CFEX-63, CFEX-93
- Other: CFEX-27, CFEX-30, CFEX-37, CFEX-65, CFEX-70, CFEX-85, CFEX-96, SPACEVAL-428, DATALIB-25

**Local**
- `BR Tools\CFEX\Specification for actions that should be done by CFEX v9.1_final 2022 0909.docx`
- `BR Tools\CFEX\cfex_specs.md` (OneClick preflight specification)
- `OneClick_Track_VBA_Export\Table_dbo_e_as_stn_sns.txt`, `Table_dbo_e_srvcls_sns.txt`
