# Business Logic — JBSbatKKKojiKnrIfFileLoad.setKikiNetInf() [541 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKKojiKnrIfFileLoad` |
| Layer | Service (Batch Processing) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKKojiKnrIfFileLoad.setKikiNetInf()

This method is a **device network information file-load setter** for a batch processing system. Its primary business role is to receive parsed device network data from an input file, perform strict **57-field format validation**, and upon success, serialize the validated data into a structured **comma-delimited record string** that can be fed into downstream communication or processing pipelines.

The method handles **Fiber-to-the-Home (FTTH)** and broader **telecom network equipment registration** scenarios. Each field in the input corresponds to a physical or logical network equipment attribute — such as service contract numbers, device model codes, MAC addresses, serial numbers, and anomaly codes — covering multiple device types: **ONU** (Optical Network Unit), **VA** (Voice Adapter), **Router**, and **PLC** (Power Line Communication) extenders.

The method implements a **gate-and-serialize design pattern**: it first runs a comprehensive validation gate (all 57 fields independently checked against format rules such as alphanumeric constraints, fixed-width, and date validation). Only if zero errors are detected (`err_cunt == 0`) does it proceed to the serialization phase, where it assembles a single pipe-delimited string using `CONMA` (comma) as a field separator and `KAIGYOU_CODE` (newline) as a record terminator.

This method serves as a **shared utility** within the batch subsystem, called directly by `JBSbatKKKojiKnrIfFileLoad.execute()` to load device network configuration data from flat files into an internal string representation suitable for HTTP/API communication with external service provision systems.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setKikiNetInf data_list, kiki_inf_net"])
    DEBUG_START["Debug: setKikiNetInf_START"]
    INIT_ERR["err_cunt = 0"]
    
    V1["Validate: Service Contract No. (index 1, max 10)"]
    V2["Validate: Service Contract Line No. (index 2, max 12)"]
    V3["Validate: Link Date (index 3, date format)"]
    V4["Validate: Account No. (index 4, max 12)"]
    V5["Validate: New/Change Div. (index 5, max 1)"]
    V6["Validate: Work Case Type Code (index 6, max 3)"]
    V7["Validate: Work Case No. (index 7, max 10)"]
    V8["Validate: Work Co. Delivery Code (index 8, max 6)"]
    V9["Validate: Device Model (ONU) (index 9, max 20)"]
    V10["Validate: MAC Address (ONU) (index 10, max 12)"]
    V11["Validate: Device Model (VA) (index 11, max 20)"]
    V12["Validate: Serial No. (VA) (index 12, max 20)"]
    V13["Validate: Device Model (Router) (index 13, max 20)"]
    V14["Validate: Serial No. (Router) (index 14, max 20)"]
    V15["Validate: Device Model (PLC) 1-8 (index 15-23, max 20 each)"]
    V16["Validate: Serial No. (PLC) 1-8 (index 24-31, max 20 each)"]
    V31["Validate: Device Svc Contract No. ONU/VA/Router/PLC 1-8 (index 31-41, max 12 each)"]
    V42["Validate: Device Anomaly Code (Router/PLC 1-8) (index 42-50, max 2 each)"]
    V51["Validate: Retired/Multi-Router fields (index 51-58, max 20/2/12/2 each)"]
    
    CHECK_ERR{err_cunt == 0}
    APPEND["Serialize: Append all 57 fields with comma separators"]
    APPEND_REC["Append record separator comma"]
    APPEND_FILE["Append file path (index 0)"]
    APPEND_NEWLINE["Append KAIGYOU_CODE = newline"]
    DEBUG_END["Debug: setKikiNetInf_END"]
    
    START --> DEBUG_START --> INIT_ERR --> V1 --> V2 --> V3 --> V4 --> V5 --> V6 --> V7 --> V8 --> V9 --> V10 --> V11 --> V12 --> V13 --> V14 --> V15 --> V16 --> V31 --> V42 --> V51 --> CHECK_ERR
    CHECK_ERR -->|Yes| APPEND --> APPEND_REC --> APPEND_FILE --> APPEND_NEWLINE --> DEBUG_END
    CHECK_ERR -->|No| DEBUG_END
```

**Processing Flow:**

1. **Initialization** — Increment debug log, initialize `err_cunt = 0` (error counter).
2. **57-field validation loop** — Each field is independently validated. If any check fails, `err_cunt` is incremented. Fields span 6 categories:
   - **Core contract data** (fields 1–8): Service contract numbers, link date, account number, operation divisors, and work assignment details.
   - **Device model and serial numbers** (fields 9–30): Model codes and serial numbers across 4 device types (ONU, VA, Router, 8 PLC extenders).
   - **Device service contract numbers** (fields 31–41): Per-device service contract association numbers (one per device type including 8 PLC extenders).
   - **Device anomaly codes** (fields 42–50): Anomaly/fault detection codes per device type (Router + 8 PLC extenders).
   - **Retired/multi-function router fields** (fields 51–58): Discontinued or multi-function router model, serial, contract, and anomaly codes.
3. **Gate check** — After all validations, if `err_cunt == 0`, serialize data.
4. **Serialization** — Concatenate all 57 data fields, comma-separated, with the file path (index 0) appended after a final comma, then terminate with a newline (`KAIGYOU_CODE`).

**Constant Resolution:**
- `CONMA = ","` — Comma separator constant (source: `JKKBatConst` or `JZMBatConst`)
- `KAIGYOU_CODE = "
"` — Newline character constant (defined in `JBSbatKKKojiKnrIfFileLoad.java`, line 153)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `data_list` | `ArrayList<String>` | Input file data parsed into individual fields. Index 0 = file path (full path). Index 1–58 = 58 data fields for device network equipment information. Contains service contract numbers, device model codes, MAC addresses, serial numbers, anomaly codes, and work assignment details. Values must pass format validation (alphanumeric, fixed-width, date format) for the method to produce output. |
| 2 | `kiki_inf_net` | `StringBuilder` | Output buffer for serialized device network information. The method appends all validated fields as a single comma-delimited record string. If validation errors exist, this buffer remains unchanged (no partial writes). The resulting string is formatted as a CSV-style record terminated by a newline, ready for downstream HTTP/API communication. |

**External state read by this method:**
| Source | Field/Method | Business Description |
|--------|-------------|---------------------|
| `super.logPrint` | `printDebugLog(String msg)` | Debug log delegate inherited from parent class — used for START/END tracing |
| `CONMA` | `","` | Comma separator constant used between each serialized field |
| `KAIGYOU_CODE` | `"
"` | Newline/record separator constant appended at the end of each record |
| `isHannkakuESuuji` | (self method) | Validates alphanumeric/uppercase-halfwidth characters with max-length constraint |
| `isHannkakuESuuji2` | (self method) | Validates alphanumeric/uppercase-halfwidth characters (extended variant) with max-length constraint |
| `isHannkakuSuuji1` | (self method) | Validates alphanumeric/halfwidth numeric characters with max-length constraint |
| `isYearMonthDay` | (self method) | Validates date format (YYYYMMDD) with optional required/blank flag |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `super.logPrint.printDebugLog("setKikiNetInf_START")` | JACBatCommon | - | Logs batch debug message at method entry |
| - | `isHannkakuESuuji(data_list.get(n), maxLen, required, fieldName)` | JBSbatKKKojiKnrIfFileLoad | - | Validates field is alphanumeric/uppercase-halfwidth with max-length; used for most fields |
| - | `isHannkakuESuuji2(data_list.get(n), maxLen, required, fieldName)` | JBSbatKKKojiKnrIfFileLoad | - | Extended alphanumeric/uppercase-halfwidth validation; used for model codes, serial numbers, anomaly codes |
| - | `isHannkakuSuuji1(data_list.get(n), maxLen, required, fieldName)` | JBSbatKKKojiKnrIfFileLoad | - | Alphanumeric/halfwidth-numeric validation; used for Account No. (field 4) |
| - | `isYearMonthDay(data_list.get(n), required, fieldName)` | JBSbatKKKojiKnrIfFileLoad | - | Date format (YYYYMMDD) validation; used for Link Date (field 3) |
| - | `super.logPrint.printDebugLog("setKikiNetInf_END")` | JACBatCommon | - | Logs batch debug message at method exit |

**Classification Note:** This method performs **no database or SC-level CRUD operations**. It is a pure **validation-and-serialization** layer: input data is validated against format rules and, upon success, assembled into a string record for downstream consumption by the caller.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKojiKnrIfFileLoad.execute() | `JBSbatKKKojiKnrIfFileLoad.execute()` -> `setKikiNetInf(data_list, kiki_inf_net)` | `printDebugLog [No-op]`, `isHannkakuESuuji [Validate]`, `isHannkakuESuuji2 [Validate]`, `isHannkakuSuuji1 [Validate]`, `isYearMonthDay [Validate]` |
| 2 | Batch: JBSbatKKKojiKnrnInfCheck | `JBSbatKKKojiKnrnInfCheck` -> `setKikiNetInf(data_work, kiki_inf_net1)`, `setKikiNetInf(data_work, kiki_inf_net2)` | `printDebugLog [No-op]`, `isHannkakuESuuji [Validate]`, `isHannkakuESuuji2 [Validate]`, `isHannkakuSuuji1 [Validate]`, `isYearMonthDay [Validate]` |

**Notes on callers:**
- **`JBSbatKKKojiKnrIfFileLoad.execute()`** — The primary batch entry point. Parses an input file into `data_list`, calls `setKikiNetInf` to validate and serialize device network information, then proceeds with downstream HTTP/API communication.
- **`JBSbatKKKojiKnrnInfCheck`** — A companion batch/service that performs device network information validation. Calls `setKikiNetInf` multiple times (with different StringBuilder targets: `kiki_inf_net1`, `kiki_inf_net2`) to build parallel device network records.

## 6. Per-Branch Detail Blocks

**Block 1** — [VARIABLE DECLARATION] (L1430)

Initialize error counter and log entry.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `super.logPrint.printDebugLog("setKikiNetInf_START")` // Log method entry [-> JACBatCommon] |
| 2 | SET | `int err_cunt = 0` // Error counter initialized to zero |

---

**Block 2** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(1), 10, true, "機器情報(ネット)：サービス契約番号"))` — Field 1: Service Contract No. (L1433)

Validate service contract number is alphanumeric/uppercase-halfwidth, max 10 chars, required.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(1), 10, true, "機器情報(ネット)：サービス契約番号")` // Field 1: Service Contract No., max 10, required |
| 2 | SET | `err_cunt++` // Increment error count |

---

**Block 3** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(2), 12, true, "機器情報(ネット)：サービス契約回線内訳番号"))` — Field 2: Service Contract Line No. (L1440)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(2), 12, true, "機器情報(ネット)：サービス契約回線内訳番号")` // Field 2: Service Contract Line No., max 12, required |
| 2 | SET | `err_cunt++` |

---

**Block 4** — [IF (validation fail)] `(isYearMonthDay(data_list.get(3), true, "機器情報(ネット)：連携年月日"))` — Field 3: Link Date (L1447)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isYearMonthDay(data_list.get(3), true, "機器情報(ネット)：連携年月日")` // Field 3: Link Date (YYYYMMDD), required |
| 2 | SET | `err_cunt++` |

---

**Block 5** — [IF (validation fail)] `(isHannkakuSuuji1(data_list.get(4), 12, true, "機器情報(ネット)：通番"))` — Field 4: Account No. (L1454)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuSuuji1(data_list.get(4), 12, true, "機器情報(ネット)：通番")` // Field 4: Account No. (numeric), max 12, required |
| 2 | SET | `err_cunt++` |

---

**Block 6** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(5), 1, false, "機器情報(ネット)：新規変更区分"))` — Field 5: New/Change Div. (L1461)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(5), 1, false, "機器情報(ネット)：新規変更区分")` // Field 5: New/Change Div., max 1, optional |
| 2 | SET | `err_cunt++` |

---

**Block 7** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(6), 3, false, "機器情報(ネット)：工事案件種別コード"))` — Field 6: Work Case Type Code (L1468)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(6), 3, false, "機器情報(ネット)：工事案件種別コード")` // Field 6: Work Case Type Code, max 3, optional |
| 2 | SET | `err_cunt++` |

---

**Block 8** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(7), 10, false, "機器情報(ネット)：工事案件番号"))` — Field 7: Work Case No. (L1475)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(7), 10, false, "機器情報(ネット)：工事案件番号")` // Field 7: Work Case No., max 10, optional |
| 2 | SET | `err_cunt++` |

---

**Block 9** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(8), 6, false, "機器情報(ネット)：工事会社配送先コード"))` — Field 8: Work Company Delivery Code (L1482)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(8), 6, false, "機器情報(ネット)：工事会社配送先コード")` // Field 8: Work Company Delivery Code, max 6, optional |
| 2 | SET | `err_cunt++` |

---

**Block 10** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(9), 20, false, "機器情報(ネット)：屋内機器型式コード（O.N.U）"))` — Field 9: Home Device Model Code (ONU) (L1489)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(9), 20, false, "機器情報(ネット)：屋内機器型式コード（O.N.U）")` // Field 9: ONU model code, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 11** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(10), 12, false, "機器情報(ネット)：MACアドレス（O.N.U）"))` — Field 10: MAC Address (ONU) (L1496)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(10), 12, false, "機器情報(ネット)：MACアドレス（O.N.U）")` // Field 10: MAC address, max 12, optional |
| 2 | SET | `err_cunt++` |

---

**Block 12** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(11), 20, false, "機器情報(ネット)：屋内機器型式コード（VA）"))` — Field 11: Home Device Model Code (VA) (L1503)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(11), 20, false, "機器情報(ネット)：屋内機器型式コード（VA）")` // Field 11: VA model code, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 13** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(12), 20, false, "機器情報(ネット)：機器製造番号（VA）"))` — Field 12: Device Serial No. (VA) (L1510)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(12), 20, false, "機器情報(ネット)：機器製造番号（VA）")` // Field 12: VA serial number, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 14** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(13), 20, false, "機器情報(ネット)：屋内機器型式コード（ルーター）"))` — Field 13: Home Device Model Code (Router) (L1517)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(13), 20, false, "機器情報(ネット)：屋内機器型式コード（ルーター）")` // Field 13: Router model code, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 15** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(14), 20, false, "機器情報(ネット)：機器製造番号（ルーター）"))` — Field 14: Device Serial No. (Router) (L1524)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(14), 20, false, "機器情報(ネット)：機器製造番号（ルーター）")` // Field 14: Router serial number, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 16** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(15), 20, false, "機器情報(ネット)：屋内機器型式コード（PLC）１"))` — Field 15: Home Device Model Code (PLC) 1 (L1531)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(15), 20, false, "機器情報(ネット)：屋内機器型式コード（PLC）１")` // Field 15: PLC extender 1 model, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Block 17** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(16), 20, false, "機器情報(ネット)：機器製造番号（PLC）１"))` — Field 16: Device Serial No. (PLC) 1 (L1538)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(16), 20, false, "機器情報(ネット)：機器製造番号（PLC）１")` // Field 16: PLC extender 1 serial, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Blocks 18–33** — [PLC Extenders 2 through 8 model + serial] (L1545–L1647)

Parallel structure: each PLC extender (2–8) has a model code field (indices 17–23) and a serial number field (indices 24–30).

| Block | Field Index | Description | Validator | Max Len |
|-------|------------|-------------|-----------|---------|
| 18 | 17 | PLC extender 2 model | `isHannkakuESuuji2` | 20 |
| 19 | 18 | PLC extender 2 serial | `isHannkakuESuuji2` | 20 |
| 20 | 19 | PLC extender 3 model | `isHannkakuESuuji2` | 20 |
| 21 | 20 | PLC extender 3 serial | `isHannkakuESuuji2` | 20 |
| 22 | 21 | PLC extender 4 model | `isHannkakuESuuji2` | 20 |
| 23 | 22 | PLC extender 4 serial | `isHannkakuESuuji2` | 20 |
| 24 | 23 | PLC extender 5 model | `isHannkakuESuuji2` | 20 |
| 25 | 24 | PLC extender 5 serial | `isHannkakuESuuji2` | 20 |
| 26 | 25 | PLC extender 6 model | `isHannkakuESuuji2` | 20 |
| 27 | 26 | PLC extender 6 serial | `isHannkakuESuuji2` | 20 |
| 28 | 27 | PLC extender 7 model | `isHannkakuESuuji2` | 20 |
| 29 | 28 | PLC extender 7 serial | `isHannkakuESuuji2` | 20 |
| 30 | 29 | PLC extender 8 model | `isHannkakuESuuji2` | 20 |
| 31 | 30 | PLC extender 8 serial | `isHannkakuESuuji2` | 20 |

Each block follows the pattern:
| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(n), 20, false, "機器情報(ネット)：...")` |
| 2 | SET | `err_cunt++` |

---

**Block 32** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(31), 12, false, "機器情報(ネット)：機器提供サービス契約番号（O.N.U）"))` — Field 31: Device Service Contract No. (ONU) (L1654)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(31), 12, false, "機器情報(ネット)：機器提供サービス契約番号（O.N.U）")` // Field 31: Device service contract no. (ONU), max 12, optional |
| 2 | SET | `err_cunt++` |

---

**Blocks 33–41** — [Device Service Contract Numbers for VA, Router, PLC 1–8] (L1661–L1726)

| Block | Field Index | Description | Validator | Max Len |
|-------|------------|-------------|-----------|---------|
| 33 | 32 | Device service contract no. (VA) | `isHannkakuESuuji` | 12 |
| 34 | 33 | Device service contract no. (Router) | `isHannkakuESuuji` | 12 |
| 35 | 34 | Device service contract no. (PLC) 1 | `isHannkakuESuuji` | 12 |
| 36 | 35 | Device service contract no. (PLC) 2 | `isHannkakuESuuji` | 12 |
| 37 | 36 | Device service contract no. (PLC) 3 | `isHannkakuESuuji` | 12 |
| 38 | 37 | Device service contract no. (PLC) 4 | `isHannkakuESuuji` | 12 |
| 39 | 38 | Device service contract no. (PLC) 5 | `isHannkakuESuuji` | 12 |
| 40 | 39 | Device service contract no. (PLC) 6 | `isHannkakuESuuji` | 12 |
| 41 | 40 | Device service contract no. (PLC) 7 | `isHannkakuESuuji` | 12 |
| 42 | 41 | Device service contract no. (PLC) 8 | `isHannkakuESuuji` | 12 |

Each block: `!isHannkakuESuuji(data_list.get(n), 12, false, "...")` → `err_cunt++`

---

**Block 43** — [IF (validation fail)] `(isHannkakuESuuji(data_list.get(42), 2, false, "機器情報(ネット)：屋内機器異動コード（ルーター）"))` — Field 42: Home Device Anomaly Code (Router) (L1733)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji(data_list.get(42), 2, false, "機器情報(ネット)：屋内機器異動コード（ルーター）")` // Field 42: Router anomaly code, max 2, optional |
| 2 | SET | `err_cunt++` |

---

**Blocks 44–50** — [Home Device Anomaly Codes for PLC 1–8] (L1740–L1782)

| Block | Field Index | Description | Validator | Max Len |
|-------|------------|-------------|-----------|---------|
| 44 | 43 | Anomaly code (PLC) 1 | `isHannkakuESuuji` | 2 |
| 45 | 44 | Anomaly code (PLC) 2 | `isHannkakuESuuji` | 2 |
| 46 | 45 | Anomaly code (PLC) 3 | `isHannkakuESuuji` | 2 |
| 47 | 46 | Anomaly code (PLC) 4 | `isHannkakuESuuji` | 2 |
| 48 | 47 | Anomaly code (PLC) 5 | `isHannkakuESuuji` | 2 |
| 49 | 48 | Anomaly code (PLC) 6 | `isHannkakuESuuji` | 2 |
| 50 | 49 | Anomaly code (PLC) 7 | `isHannkakuESuuji` | 2 |
| 51 | 50 | Anomaly code (PLC) 8 | `isHannkakuESuuji` | 2 |

Each block: `!isHannkakuESuuji(data_list.get(n), 2, false, "...")` → `err_cunt++`

---

**Block 52** — [IF (validation fail)] `(isHannkakuESuuji2(data_list.get(51), 20, false, "機器情報(ネット)：屋内機器型式コード（撤去ルーター）"))` — Field 51: Home Device Model Code (Retired Router) (L1789)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!isHannkakuESuuji2(data_list.get(51), 20, false, "機器情報(ネット)：屋内機器型式コード（撤去ルーター）")` // Field 51: Retired router model, max 20, optional |
| 2 | SET | `err_cunt++` |

---

**Blocks 53–58** — [Retired/Multi-Function Router fields] (L1796–L1850)

| Block | Field Index | Description | Validator | Max Len |
|-------|------------|-------------|-----------|---------|
| 53 | 52 | Serial No. (Retired Router) | `isHannkakuESuuji2` | 20 |
| 54 | 53 | Model Code (Multi-Function Router) | `isHannkakuESuuji2` | 20 |
| 55 | 54 | Serial No. (Multi-Function Router) | `isHannkakuESuuji2` | 20 |
| 56 | 55 | Service Contract No. (Multi-Function Router) | `isHannkakuESuuji` | 12 |
| 57 | 56 | Anomaly Code (Multi-Function Router) | `isHannkakuESuuji` | 2 |
| 58 | 57 | Model Code (Retired Multi-Function Router) | `isHannkakuESuuji2` | 20 |
| 59 | 58 | Serial No. (Retired Multi-Function Router) | `isHannkakuESuuji2` | 20 |

Each block: `isHannkakuESuuji2` or `isHannkakuESuuji` → `err_cunt++`

---

**Block 60** — [IF (gate check)] `(0 == err_cunt)` (L1857)

If no validation errors occurred, serialize all 57 data fields into the output buffer.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `kiki_inf_net.append(data_list.get(1))` | Append Service Contract No. |
| 2 | EXEC | `kiki_inf_net.append(CONMA)` | Append comma separator `[-> CONMA=","]` |
| 3 | EXEC | `kiki_inf_net.append(data_list.get(2))` | Append Service Contract Line No. |
| 4 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 5 | EXEC | `kiki_inf_net.append(data_list.get(3))` | Append Link Date |
| 6 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 7 | EXEC | `kiki_inf_net.append(data_list.get(4))` | Append Account No. |
| 8 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 9 | EXEC | `kiki_inf_net.append(data_list.get(5))` | Append New/Change Div. |
| 10 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 11 | EXEC | `kiki_inf_net.append(data_list.get(6))` | Append Work Case Type Code |
| 12 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 13 | EXEC | `kiki_inf_net.append(data_list.get(7))` | Append Work Case No. |
| 14 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 15 | EXEC | `kiki_inf_net.append(data_list.get(8))` | Append Work Co. Delivery Code |
| 16 | EXEC | `kiki_inf_net.append(CONMA)` | Comma separator |
| 17–104 | EXEC | `kiki_inf_net.append(data_list.get(n)); kiki_inf_net.append(CONMA);` | For each field 9–58: append model/serial/contract/anomaly codes with comma separators |
| 105 | EXEC | `kiki_inf_net.append(CONMA)` | Append trailing comma (record separator) |
| 106 | EXEC | `kiki_inf_net.append(data_list.get(0))` | Append file path (full path) from index 0 |
| 107 | EXEC | `kiki_inf_net.append(KAIGYOU_CODE)` | Append newline record terminator `[-> KAIGYOU_CODE="
"]` |

---

**Block 61** — [VARIABLE DECLARATION / EXIT] (L1967)

Log completion regardless of validation outcome.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `super.logPrint.printDebugLog("setKikiNetInf_END")` // Log method exit [-> JACBatCommon] |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kiki_inf_net` | Field | Device Network Information — serialized string holding all network equipment attributes for a single service contract line item |
| `data_list` | Field | Parsed input file data — ArrayList where index 0 is the file path (full path) and indices 1–58 are individual data fields |
| `err_cunt` | Field | Error count — accumulator for validation failures across all 57 fields |
| `CONMA` | Constant | Comma (`,`) — field delimiter used in the serialized output record |
| `KAIGYOU_CODE` | Constant | Newline character (`
`) — record terminator appended at the end of each serialized line |
| ONU | Business term | Optical Network Unit — customer-premises equipment that terminates fiber optic cables and provides network connectivity |
| VA | Business term | Voice Adapter — device that enables voice-over-IP (VoIP) service over the fiber network |
| PLC | Business term | Power Line Communication — home networking technology that uses electrical wiring to transmit data; in this context, PLC extenders are additional network nodes |
| FTTH | Business term | Fiber To The Home — broadband network architecture using optical fiber to reach individual endpoints |
| 機器情報(ネット) | Field (Japanese) | Device Information (Network) — Japanese label for network equipment data fields in the batch file format |
| サービス契約番号 | Field (Japanese) | Service Contract Number — the primary identifier for a subscribed telecom service |
| サービス契約回線内訳番号 | Field (Japanese) | Service Contract Line Detail Number — identifies a specific line within a multi-line service contract |
| 連携年月日 | Field (Japanese) | Link/Integration Date — date when the service contract was linked/registered in the system (YYYYMMDD format) |
| 通番 | Field (Japanese) | Account Number — sequential account identifier for the subscriber |
| 新規変更区分 | Field (Japanese) | New/Change Division — indicator of whether this record is a new service activation or a modification to an existing service |
| 工事案件種別コード | Field (Japanese) | Work Case Type Code — classification code for the type of installation/maintenance work |
| 工事案件番号 | Field (Japanese) | Work Case Number — unique identifier for a work order/case |
| 工事会社配送先コード | Field (Japanese) | Work Company Delivery Destination Code — identifies the contractor company responsible for equipment delivery/installation |
| 屋内機器型式コード | Field (Japanese) | Indoor Device Model Code — model number of customer premises equipment (ONU, VA, Router, PLC) |
| 機器製造番号 | Field (Japanese) | Device Serial Number — unique manufacturing serial number of the equipment |
| MACアドレス | Field (Japanese) | MAC Address — hardware-level network interface identifier of the ONU device |
| 機器提供サービス契約番号 | Field (Japanese) | Device Provision Service Contract Number — links a specific device to its service contract |
| 屋内機器異動コード | Field (Japanese) | Indoor Device Movement/Anomaly Code — code indicating device status changes, faults, or anomalies |
| 撤去ルーター | Field (Japanese) | Retired/Removed Router — router equipment that has been decommissioned or removed |
| 多機能ルーター | Field (Japanese) | Multi-Function Router — router with integrated capabilities (e.g., router + switch + WiFi + VoIP) |
| isHannkakuESuuji | Method | Alphanumeric Uppercase-halfwidth Numeric validation — checks that a field contains only uppercase letters, digits, and halfwidth characters |
| isHannkakuESuuji2 | Method | Extended alphanumeric/uppercase-halfwidth validation — variant used for longer fields like model codes and serial numbers |
| isHannkakuSuuji1 | Method | Alphanumeric/Halfwidth-numeric validation — stricter check used for numeric-only fields like Account Number |
| isYearMonthDay | Method | Date format validation — verifies YYYYMMDD format for the Link Date field |
| JBSbatKKKojiKnrIfFileLoad | Class | Koji (Maintenance) Information Network File Load Batch Service — batch processing class that loads device configuration data from flat files for FTTH service provision |
