# Business Logic — JBSbatKKKojiKnrIfFileLoad.execute() [233 LOC]

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

## 1. Role

### JBSbatKKKojiKnrIfFileLoad.execute()

This method is the main entry point of a batch service that receives and processes **construction-related information reception files** (工事関連情報受信ファイル) from an internal integration interface. It acts as a **file-based dispatcher and router**: it reads a single incoming CSV file (`KKIFI023001_YYYYMMDD.csv`) that contains mixed-type record entries, classifies each record by its 2-character `rec_div` (record division) code, and aggregates data into 14 separate in-memory StringBuilders — one per record type.

The method handles **14 distinct record service categories** through a dispatch pattern: indoor survey results (宅内調査結果情報), design equipment information (設計設備情報), transmission equipment information (伝送設備情報), construction completion information (工事完了情報), construction schedule information for Network and TV, device (terminal) information for Network and TV, construction cancellation information, indoor construction information, construction cost information, STB installation information, and (added in v31.00.00) temporary cancellation receipt and cancellation cancel information.

Each record is parsed as a CSV row, sanitized of quote characters, validated for format, and then routed to the appropriate aggregation method (`setTakchoRsltIf`, `setDsgnEquipInf`, etc.) — a classic **strategy-based dispatch** pattern. After all records are processed, the method writes 14 separate output CSV files, each routed to a distinct file path identified by a unique file ID constant, using the `executeOutputFile` method which delegates to `BufferedWriter` for file I/O.

The method plays a critical role in the **construction information reception pipeline**: it bridges the inbound file from the internal I/F staging directory and the outbound per-type files consumed by downstream processing services (e.g., `JBSbatKKKojiKnrnInfCheck` for validation, and `JBSbatKKKojiKnrnInfToroku` for registration). It is a batch-only, fire-and-forget service invoked as part of the nightly construction information reception workflow. It always returns `null` (a no-op `JBSbatOutputItem`), consistent with batch services that signal completion via file output rather than return values.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute START"])
    START --> LOG_START["Log: execute_START"]
    LOG_START --> INIT_VARS["Initialize StringBuilders
and data_work/rec_div"]
    INIT_VARS --> GET_FREE["Get free_item from commonItem"]
    GET_FREE --> SET_DIRS["Set mid_dir_kk and naibu_receive_dir_kk
= free_item"]
    SET_DIRS --> READ_FILE["Read input file
KKIFI023001_YYYYMMDD.csv"]
    READ_FILE --> LOOP_CHECK{"File list empty?"}
    LOOP_CHECK -->|No| GET_ROW["Get row i from file_data_list"]
    GET_ROW --> SPLIT_ROW["Split row by comma,
remove quotes"]
    SPLIT_ROW --> GET_REC{"rec_div != null?"}
    GET_REC -->|No| SKIP_ROW["Continue to next row"]
    GET_REC -->|Yes| CHECK_REC["Check rec_div is 2-digit
alphanumeric"]
    CHECK_REC -->|Fail| SKIP_ROW
    CHECK_REC -->|Pass| DISPATCH{rec_div value?}
    DISPATCH -->|"10"| CASE_10["setTakchoRsltIf
(L10) Indoor survey result"]
    DISPATCH -->|"20"| CASE_20["setDsgnEquipInf
(L20) Design equipment info"]
    DISPATCH -->|"30"| CASE_30["setDensoEquipInf
(L30) Transmission equipment info"]
    DISPATCH -->|"40"| CASE_40["setKojiFinInf
(L40) Construction completion info"]
    DISPATCH -->|"60"| CASE_60["setKojiRsvNet
(L60) Construction schedule (Network)"]
    DISPATCH -->|"61"| CASE_61["setKojiRsvInfTv
(L61) Construction schedule (TV)"]
    DISPATCH -->|"D0"| CASE_D0["setKikiNetInf
(LD0) Device info (Network)"]
    DISPATCH -->|"D1"| CASE_D1["setKikiInfTv
(LD1) Device info (TV)"]
    DISPATCH -->|"90"| CASE_90["setKojiClInf
(L90) Construction cancellation info"]
    DISPATCH -->|"B0"| CASE_B0["setTakniKojiInf
(LB0) Indoor construction info"]
    DISPATCH -->|"C0"| CASE_C0["setKojihiInf
(LC0) Construction cost info"]
    DISPATCH -->|"Y0"| CASE_Y0["setStbChakukoInf
(LY0) STB installation info"]
    DISPATCH -->|"E0"| CASE_E0["setKrCnclUkInf
(LE0) Temporary cancellation receipt"]
    DISPATCH -->|"F0"| CASE_F0["setKrCnclClInf
(LF0) Temporary cancellation cancel"]
    DISPATCH -->|Other| LOG_OTHER["Log: Unprocessed record"]
    LOG_OTHER --> NEXT_ROW["Next iteration"]
    CASE_10 --> NEXT_ROW
    CASE_20 --> NEXT_ROW
    CASE_30 --> NEXT_ROW
    CASE_40 --> NEXT_ROW
    CASE_60 --> NEXT_ROW
    CASE_61 --> NEXT_ROW
    CASE_D0 --> NEXT_ROW
    CASE_D1 --> NEXT_ROW
    CASE_90 --> NEXT_ROW
    CASE_B0 --> NEXT_ROW
    CASE_C0 --> NEXT_ROW
    CASE_Y0 --> NEXT_ROW
    CASE_E0 --> NEXT_ROW
    CASE_F0 --> NEXT_ROW
    SKIP_ROW --> NEXT_ROW
    NEXT_ROW --> NEXT_ROW_CHECK{"i < size?"}
    NEXT_ROW_CHECK -->|Yes| GET_ROW
    NEXT_ROW_CHECK -->|No| WRITE_FILES["Write all output CSV files"]
    WRITE_FILES --> OUT_TAKCHO["takchoRsltInfFileOput
KKIFM052001"]
    OUT_TAKCHO --> OUT_DSGN["dsgnEquipInfFileOput
KKIFM059001"]
    OUT_DSGN --> OUT_DENSO["densoEquipInfFileOput
KKIFM060001"]
    OUT_DENSO --> OUT_KOJIFIN["kojiFinInfFileOput
KKIFM051001"]
    OUT_KOJIFIN --> OUT_KRSVNET["kojiRsvNetFileOput
KKIFM061001"]
    OUT_KRSVNET --> OUT_KRSVT["kojiRsvTvInfFileOput
KKIFM062001"]
    OUT_KRSVT --> OUT_KIKINET["kikiNetInfFileOput
KKIFM063001"]
    OUT_KIKINET --> OUT_KIKITV["kikiInfTvFileOput
KKIFM064001"]
    OUT_KIKITV --> OUT_KOJICL["kojiClInfFileOput
KKIFM065001"]
    OUT_KOJICL --> OUT_TAKNI["takniKojiInfFileOput
KKIFM066001"]
    OUT_TAKNI --> OUT_KOJIHI["kojihiInfFileOput
KKIFM067001"]
    OUT_KOJIHI --> OUT_STB["stbChakukoInfFileOput
KKIFM166001"]
    OUT_STB --> OUT_KRUK["krCnclUkInfFileOput
KKIFM770001"]
    OUT_KRUK --> OUT_KRCL["krCnclClInfFileOput
KKIFM771001"]
    OUT_KRCL --> LOG_END["Log: execute_END"]
    LOG_END --> RETURN_NULL["Return null"]
    RETURN_NULL --> END_NODE(["execute END"])
```

### Constant Resolution

| Constant | Value | Business Meaning |
|----------|-------|------------------|
| `KOJI_KNRN_INF_RCV_FILE_ID` | `"KKIFI023001"` | File ID for construction-related information reception file |
| `FILE_KEISHIKI` | `".csv"` | File extension (suffix) |
| `REC_DOV_10` | `"10"` | Record division: Indoor survey result (宅内調査結果情報) |
| `REC_DOV_20` | `"20"` | Record division: Design equipment info (設計設備情報) |
| `REC_DOV_30` | `"30"` | Record division: Transmission equipment info (伝送設備情報) |
| `REC_DOV_40` | `"40"` | Record division: Construction completion info (工事完了情報) |
| `REC_DOV_60` | `"60"` | Record division: Construction schedule (Network) (工事予定情報-ネット) |
| `REC_DOV_61` | `"61"` | Record division: Construction schedule (TV) (工事予定情報-テレビ) |
| `REC_DOV_D0` | `"D0"` | Record division: Device info (Network) (機器情報-ネット) |
| `REC_DOV_D1` | `"D1"` | Record division: Device info (TV) (機器情報-テレビ) |
| `REC_DOV_90` | `"90"` | Record division: Construction cancellation info (工事取消情報) |
| `REC_DOV_B0` | `"B0"` | Record division: Indoor construction info (宅内工事情報) |
| `REC_DOV_C0` | `"C0"` | Record division: Construction cost info (工事費情報) |
| `REC_DOV_Y0` | `"Y0"` | Record division: STB installation info (STB着工情報) |
| `REC_DOV_E0` | `"E0"` | Record division: Temporary cancellation receipt (工事仮キャンセル受領情報) |
| `REC_DOV_F0` | `"F0"` | Record division: Temporary cancellation cancel (工事仮キャンセル取消情報) |

Output file ID mappings:

| Output Method | Output File ID | Output File |
|---------------|---------------|-------------|
| `takchoRsltInfFileOput` | `KKIFM052001` | Indoor survey result file |
| `dsgnEquipInfFileOput` | `KKIFM059001` | Design equipment info file |
| `densoEquipInfFileOput` | `KKIFM060001` | Transmission equipment info file |
| `kojiFinInfFileOput` | `KKIFM051001` | Construction completion info file |
| `kojiRsvNetFileOput` | `KKIFM061001` | Construction schedule (Network) file |
| `kojiRsvTvInfFileOput` | `KKIFM062001` | Construction schedule (TV) file |
| `kikiNetInfFileOput` | `KKIFM063001` | Device info (Network) file |
| `kikiInfTvFileOput` | `KKIFM064001` | Device info (TV) file |
| `kojiClInfFileOput` | `KKIFM065001` | Construction cancellation info file |
| `takniKojiInfFileOput` | `KKIFM066001` | Indoor construction info file |
| `kojihiInfFileOput` | `KKIFM067001` | Construction cost info file |
| `stbChakukoInfFileOput` | `KKIFM166001` | STB installation info file |
| `krCnclUkInfFileOput` | `KKIFM770001` | Temporary cancellation receipt file |
| `krCnclClInfFileOput` | `KKIFM771001` | Temporary cancellation cancel file |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters; it operates entirely on instance fields and internal state. |

### Instance Fields / External State

| Field | Type | Business Description |
|-------|------|---------------------|
| `commonItem` | `JBSbatCommonItem` | Common batch item holding runtime configuration, including `freeItem` which specifies the intermediate file staging directory path |
| `super.opeDate` | `String` | Batch operation date (YYYYMMDD format) — used to construct the input file name |
| `super.logPrint` | Log handler | Debug logging utility from the parent `JBSbatBusinessService` class |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatKKKojiKnrIfFileLoad.getInputFile` | JBSbatKKKojiKnrIfFileLoad | - | Reads the input CSV file containing construction-related information records from the internal I/F staging directory |
| - | `JBSbatKKKojiKnrIfFileLoad.isHannkakuESuuji` | JBSbatKKKojiKnrIfFileLoad | - | Validates that `rec_div` is a 2-character alphanumeric value (half-width English/numeric) |
| - | `JBSbatKKKojiKnrIfFileLoad.setTakchoRsltIf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates indoor survey result record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setDsgnEquipInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates design equipment info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setDensoEquipInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates transmission equipment info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKojiFinInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates construction completion info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKojiRsvNet` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates construction schedule (Network) record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKojiRsvInfTv` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates construction schedule (TV) record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKikiNetInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates device info (Network) record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKikiInfTv` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates device info (TV) record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKojiClInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates construction cancellation info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setTakniKojiInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates indoor construction info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKojihiInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates construction cost info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setStbChakukoInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates STB installation info record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKrCnclUkInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates temporary cancellation receipt record data into StringBuilder |
| - | `JBSbatKKKojiKnrIfFileLoad.setKrCnclClInf` | JBSbatKKKojiKnrIfFileLoad | - | Aggregates temporary cancellation cancel record data into StringBuilder |
| C | `JBSbatKKKojiKnrIfFileLoad.takchoRsltInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM052001.csv | Writes aggregated indoor survey result data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.dsgnEquipInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM059001.csv | Writes aggregated design equipment info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.densoEquipInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM060001.csv | Writes aggregated transmission equipment info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kojiFinInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM051001.csv | Writes aggregated construction completion info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kojiRsvNetFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM061001.csv | Writes aggregated construction schedule (Network) data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kojiRsvTvInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM062001.csv | Writes aggregated construction schedule (TV) data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kikiNetInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM063001.csv | Writes aggregated device info (Network) data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kikiInfTvFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM064001.csv | Writes aggregated device info (TV) data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kojiClInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM065001.csv | Writes aggregated construction cancellation info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.takniKojiInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM066001.csv | Writes aggregated indoor construction info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.kojihiInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM067001.csv | Writes aggregated construction cost info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.stbChakukoInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM166001.csv | Writes aggregated STB installation info data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.krCnclUkInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM770001.csv | Writes aggregated temporary cancellation receipt data to output CSV file |
| C | `JBSbatKKKojiKnrIfFileLoad.krCnclClInfFileOput` | JBSbatKKKojiKnrIfFileLoad | File: KKIFM771001.csv | Writes aggregated temporary cancellation cancel data to output CSV file |
| - | `JACBatCommon.printDebugLog` | JACBatCommon | - | Calls `printDebugLog` in `JACBatCommon` |
| - | `JACbatDebugLogUtil.printDebugLog` | JACbatDebugLog | - | Calls `printDebugLog` in `JACbatDebugLogUtil` |
| - | `JCKLcsRenkeiUtil.printDebugLog` | JCKLcsRenkei | - | Calls `printDebugLog` in `JCKLcsRenkeiUtil` |
| - | `JKKHttpCommunicator.printDebugLog` | JKKHttpCommunicator | - | Calls `printDebugLog` in `JKKHttpCommunicator` |
| - | `JBSbatDKHmpinAdd.split` | JBSbatDKHmpinAdd | - | Calls `split` in `JBSbatDKHmpinAdd` |
| - | `JBSbatDKNyukaFinAdd.split` | JBSbatDKNyukaFinAdd | - | Calls `split` in `JBSbatDKNyukaFinAdd` |
| - | `JBSbatDKTanaMoveShkaCmpAdd.split` | JBSbatDKTanaMoveShkaCmpAdd | - | Calls `split` in `JBSbatDKTanaMoveShkaCmpAdd` |
| - | `JBSbatDKTkkikiGetReqHmpin.split` | JBSbatDKTkkikiGetReqHmpin | - | Calls `split` in `JBSbatDKTkkikiGetReqHmpin` |
| - | `JBSbatDKTkkikiGetReqNyuka.split` | JBSbatDKTkkikiGetReqNyuka | - | Calls `split` in `JBSbatDKTkkikiGetReqNyuka` |
| - | `JBSbatKKCashPostAddMail.printDebugLog` | JBSbatKKCashPostAddMail | - | Calls `printDebugLog` in `JBSbatKKCashPostAddMail` |

**CRUD Summary:** This method performs **file I/O operations only** — no database CRUD. It reads 1 input file (R) and writes 14 output files (C). All intermediate processing occurs in-memory via StringBuilder aggregation. The `executeOutputFile` private method uses `BufferedWriter` with `OutputStreamWriter` (encoding from parent class `ENCODE`) to write data to disk, wrapping any IOException in a `JBSbatBusinessException` with error code `EKKB0250CE`.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKojiKnrIfFileLoad (self-invoked batch entry) | `JBSbatKKKojiKnrIfFileLoad.execute` | `getInputFile [R] KKIFI023001.csv input file` |
| - | | | `setTakchoRsltIf [U] in-memory aggregation` |
| - | | | `takchoRsltInfFileOput [C] KKIFM052001.csv` |
| - | | | `dsgnEquipInfFileOput [C] KKIFM059001.csv` |
| - | | | `densoEquipInfFileOput [C] KKIFM060001.csv` |
| - | | | `kojiFinInfFileOput [C] KKIFM051001.csv` |
| - | | | `kojiRsvNetFileOput [C] KKIFM061001.csv` |
| - | | | `kojiRsvTvInfFileOput [C] KKIFM062001.csv` |
| - | | | `kikiNetInfFileOput [C] KKIFM063001.csv` |
| - | | | `kikiInfTvFileOput [C] KKIFM064001.csv` |
| - | | | `kojiClInfFileOput [C] KKIFM065001.csv` |
| - | | | `takniKojiInfFileOput [C] KKIFM066001.csv` |
| - | | | `kojihiInfFileOput [C] KKIFM067001.csv` |
| - | | | `stbChakukoInfFileOput [C] KKIFM166001.csv` |
| - | | | `krCnclUkInfFileOput [C] KKIFM770001.csv` |
| - | | | `krCnclClInfFileOput [C] KKIFM771001.csv` |

**Notes:** This method is not directly invoked by any screen or CBS (no callers were found in the codebase using `new JBSbatKKKojiKnrIfFileLoad` or `.execute()` references). It is a standalone batch service invoked by the batch orchestration framework, consistent with the `JBSbatBusinessService` parent class pattern. The batch runner discovers and executes it as part of the nightly job schedule based on its class naming convention (`JBSbat*` prefix).

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L191)

Initialize all in-memory storage for record aggregation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `data_work = ""` // Construction-related information reception file 1-line data hold // 工事関連情報受信ファイル1行データ保持 |
| 2 | SET | `rec_div = ""` // Record division hold // レコード区分の保持 |
| 3 | SET | `tak_cho_rslt_inf = new StringBuilder()` // Indoor survey result StringBuilder // 宅内調査結果情報文字列保持用 |
| 4 | SET | `dsgn_equip_inf = new StringBuilder()` // Design equipment info StringBuilder // 設計設備情報文字列保持用 |
| 5 | SET | `denso_equip_inf = new StringBuilder()` // Transmission equipment info StringBuilder // 伝送設備情報文字列保持用 |
| 6 | SET | `koji_fin_inf = new StringBuilder()` // Construction completion info StringBuilder // 工事完了情報文字列保持用 |
| 7 | SET | `koji_rsv_net = new StringBuilder()` // Construction schedule (Network) StringBuilder // 工事予定情報(ネット)文字列保持用 |
| 8 | SET | `koji_rsv_inf_tv = new StringBuilder()` // Construction schedule (TV) StringBuilder // 工事予定情報(テレビ)文字列保持用 |
| 9 | SET | `kiki_inf_net = new StringBuilder()` // Device info (Network) StringBuilder // 機器情報(ネット)文字列保持用 |
| 10 | SET | `kiki_Inf_tv = new StringBuilder()` // Device info (TV) StringBuilder // 機器情報(テレビ)文字列保持用 |
| 11 | SET | `koji_cl_inf = new StringBuilder()` // Construction cancellation info StringBuilder // 工事取消情報文字列保持用 |
| 12 | SET | `takni_koji_inf = new StringBuilder()` // Indoor construction info StringBuilder // 宅内工事情報文字列保持用 |
| 13 | SET | `kojihi_Inf = new StringBuilder()` // Construction cost info StringBuilder // 工事費情報文字列保持用 |
| 14 | SET | `stb_chakuko_Inf = new StringBuilder()` // STB installation info StringBuilder // STB着工情報文字列保持用 |
| 15 | SET | `kr_cncl_uk_inf = new StringBuilder()` // Temporary cancellation receipt StringBuilder // 工事仮キャンセル受領情報文字列保持用 |
| 16 | SET | `kr_cncl_cl_inf = new StringBuilder()` // Temporary cancellation cancel StringBuilder // 工事仮キャンセル取消情報文字列保持用 |
| 17 | SET | `data_list = null` // ArrayList for parsed data rows // 「"」を削除したデータを保持 |
| 18 | EXEC | `super.logPrint.printDebugLog("execute_START")` // Start debug log |

**Block 2** — [VARIABLE SETUP] (L220)

Obtain the intermediate file storage directory from common configuration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `free_item = commonItem.getFreeItem()` // Get free item from common item // フリー項目を取得します |
| 2 | SET | `mid_dir_kk = free_item` // Intermediate file storage directory // 中間ファイル格納先 |
| 3 | SET | `naibu_receive_dir_kk = free_item` // Internal I/F storage directory // 内部I/F格納先 |

**Block 3** — [FILE READ] (L226)

Read the input CSV file. The file path is constructed as `{free_item}/{KKIFI023001}_{YYYYMMDD}.csv`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `file_data_list = getInputFile(naibu_receive_dir_kk + KOJI_KNRN_INF_RCV_FILE_ID + "_" + super.opeDate + FILE_KEISHIKI)` // Read construction-related information reception file // 工事関連情報受信ファイル読み込み |

**Block 4** — [FOR LOOP: iterate all rows] (L229)

Outer loop: iterate over each row of the input file.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` // Loop counter // for (int i = 0; ...) |
| 2 | COND | `i < file_data_list.size()` // Process all rows // 工事関連情報受信ファイル件数の繰り返し |
| 3 | SET | `data_work = file_data_list.get(i)` // Get 1-line data // 1行目を取得 |

**Block 4.1** — [ROW PARSING] (L234)

Parse the CSV row: split by comma and strip quote characters.

| # | Type | Code |
|---|------|------|
| 1 | SET | `data = data_work.split(",", -1)` // Split data by comma // データを分解 |
| 2 | SET | `data_list = new ArrayList<String>(data.length)` // Store data without quotes // 「"」を削除したデータを保持 |

**Block 4.1.1** — [FOR LOOP: strip quotes] (L239)

Inner loop: iterate over each field and remove quote characters.

| # | Type | Code |
|---|------|------|
| 1 | SET | `j = 0` // Inner loop counter |
| 2 | COND | `j < data.length` // Process all fields |
| 3 | EXEC | `data_list.add(data[j].replaceAll("\"", ""))` // Remove `"` character // ["]を削除 |

**Block 4.2** — [NULL CHECK on rec_div] (L247)

Check if the first field (`rec_div`) is null. If null, skip this row.

| # | Type | Code |
|---|------|------|
| 1 | COND | `null != data_list.get(0)` // rec_div is not null // レコード区分の取得 |
| 2 | SET | `rec_div = data_list.get(0)` // Assign rec_div from first field |
| 3 | EXEC | `continue` // Skip to next row (else branch) // else → continue |

**Block 4.3** — [FORMAT VALIDATION] (L256)

Validate that `rec_div` is a 2-character half-width alphanumeric value.

| # | Type | Code |
|---|------|------|
| 1 | COND | `isHannkakuESuuji(rec_div, 2, true, "レコード区分")` // 2-digit alphanumeric check // レコード区分項目チェック |
| 2 | EXEC | `continue` // If validation fails, skip row // If false → continue |

**Block 4.4** — [DISPATCH: record division switch] (L261)

Core dispatch logic: route records by `rec_div` value. Each branch calls a `set*` method to aggregate data and then continues to the next row.

**Block 4.4.1** — [IF] `REC_DOV_10 = "10"` (宅内調査結果情報 — Indoor survey result) (L261)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setTakchoRsltIf(data_list, tak_cho_rslt_inf)` // Set indoor survey result // 宅内調査結果情報設定 |

**Block 4.4.2** — [ELSE-IF] `REC_DOV_20 = "20"` (設計設備情報 — Design equipment info) (L268)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setDsgnEquipInf(data_list, dsgn_equip_inf)` // Set design equipment info // 設計設備情報設定 |

**Block 4.4.3** — [ELSE-IF] `REC_DOV_30 = "30"` (伝送設備情報 — Transmission equipment info) (L275)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setDensoEquipInf(data_list, denso_equip_inf)` // Set transmission equipment info // 伝送設備情報設定 |

**Block 4.4.4** — [ELSE-IF] `REC_DOV_40 = "40"` (工事完了情報 — Construction completion info) (L282)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKojiFinInf(data_list, koji_fin_inf)` // Set construction completion info // 工事完了情報設定 |

**Block 4.4.5** — [ELSE-IF] `REC_DOV_60 = "60"` (工事予定情報(ネット) — Construction schedule (Network)) (L289)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKojiRsvNet(data_list, koji_rsv_net)` // Set construction schedule (Network) // 工事予定情報(ネット)設定 |

**Block 4.4.6** — [ELSE-IF] `REC_DOV_61 = "61"` (工事予定情報(テレビ) — Construction schedule (TV)) (L296)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKojiRsvInfTv(data_list, koji_rsv_inf_tv)` // Set construction schedule (TV) // 工事予定情報(テレビ)設定 |

**Block 4.4.7** — [ELSE-IF] `REC_DOV_D0 = "D0"` (機器情報(ネット) — Device info (Network)) (L303)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKikiNetInf(data_list, kiki_inf_net)` // Set device info (Network) // 機器情報(ネット)設定 |

**Block 4.4.8** — [ELSE-IF] `REC_DOV_D1 = "D1"` (機器情報(テレビ) — Device info (TV)) (L310)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKikiInfTv(data_list, kiki_Inf_tv)` // Set device info (TV) // 機器情報(テレビ)設定 |

**Block 4.4.9** — [ELSE-IF] `REC_DOV_90 = "90"` (工事取消情報 — Construction cancellation info) (L317)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKojiClInf(data_list, koji_cl_inf)` // Set construction cancellation info // 工事取消情報設定 |

**Block 4.4.10** — [ELSE-IF] `REC_DOV_B0 = "B0"` (宅内工事情報 — Indoor construction info) (L324)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setTakniKojiInf(data_list, takni_koji_inf)` // Set indoor construction info // 宅内工事情報設定 |

**Block 4.4.11** — [ELSE-IF] `REC_DOV_C0 = "C0"` (工事費情報 — Construction cost info) (L331)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKojihiInf(data_list, kojihi_Inf)` // Set construction cost info // 工事費情報設定 |

**Block 4.4.12** — [ELSE-IF] `REC_DOV_Y0 = "Y0"` (STB着工情報 — STB installation info) (L338)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setStbChakukoInf(data_list, stb_chakuko_Inf)` // Set STB installation info // STB着工情報設定 |

**Block 4.4.13** — [ELSE-IF] `REC_DOV_E0 = "E0"` (工事仮キャンセル受領情報 — Temporary cancellation receipt) (L345)

> Added in v31.00.00 (ANK-3136-00-00): OPMS hard-keeper cut-over support.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKrCnclUkInf(data_list, kr_cncl_uk_inf)` // Set temporary cancellation receipt // 工事仮キャンセル受領情報設定 |

**Block 4.4.14** — [ELSE-IF] `REC_DOV_F0 = "F0"` (工事仮キャンセル取消情報 — Temporary cancellation cancel) (L352)

> Added in v31.00.00 (ANK-3136-00-00): OPMS hard-keeper cut-over support.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setKrCnclClInf(data_list, kr_cncl_cl_inf)` // Set temporary cancellation cancel // 工事仮キャンセル取消情報設定 |

**Block 4.4.15** — [ELSE] unknown rec_div (L359)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("処理対象外のレコード区分: " + rec_div)` // Log unprocessed record division // 処理対象外のレコード区分 |

**Block 5** — [FILE OUTPUT: write all 14 output files] (L367)

Sequential file output phase. Each method writes the aggregated StringBuilder content to a separate CSV file in `mid_dir_kk`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `takchoRsltInfFileOput(tak_cho_rslt_inf.toString(), mid_dir_kk)` // Write indoor survey result file // 宅内調査結果情報ファイル出力 |
| 2 | CALL | `dsgnEquipInfFileOput(dsgn_equip_inf.toString(), mid_dir_kk)` // Write design equipment info file // 設計設備情報ファイル出力 |
| 3 | CALL | `densoEquipInfFileOput(denso_equip_inf.toString(), mid_dir_kk)` // Write transmission equipment info file // 伝送設備情報ファイル出力 |
| 4 | CALL | `kojiFinInfFileOput(koji_fin_inf.toString(), mid_dir_kk)` // Write construction completion info file // 工事完了情報ファイル出力 |
| 5 | CALL | `kojiRsvNetFileOput(koji_rsv_net.toString(), mid_dir_kk)` // Write construction schedule (Network) file // 工事予定情報(ネット)ファイル出力 |
| 6 | CALL | `kojiRsvTvInfFileOput(koji_rsv_inf_tv.toString(), mid_dir_kk)` // Write construction schedule (TV) file // 工事予定情報(テレビ)ファイル出力 |
| 7 | CALL | `kikiNetInfFileOput(kiki_inf_net.toString(), mid_dir_kk)` // Write device info (Network) file // 機器情報(ネット)ファイル出力 |
| 8 | CALL | `kikiInfTvFileOput(kiki_Inf_tv.toString(), mid_dir_kk)` // Write device info (TV) file // 機器情報(テレビ)ファイル出力 |
| 9 | CALL | `kojiClInfFileOput(koji_cl_inf.toString(), mid_dir_kk)` // Write construction cancellation info file // 工事取消情報ファイル出力 |
| 10 | CALL | `takniKojiInfFileOput(takni_koji_inf.toString(), mid_dir_kk)` // Write indoor construction info file // 宅内工事情報ファイル出力 |
| 11 | CALL | `kojihiInfFileOput(kojihi_Inf.toString(), mid_dir_kk)` // Write construction cost info file // 工事費情報設定ファイル出力 |
| 12 | CALL | `stbChakukoInfFileOput(stb_chakuko_Inf.toString(), mid_dir_kk)` // Write STB installation info file // STB着工情報設定ファイル出力 |
| 13 | CALL | `krCnclUkInfFileOput(kr_cncl_uk_inf.toString(), mid_dir_kk)` // Write temporary cancellation receipt file // 工事仮キャンセル受領情報設定ファイル出力 |
| 14 | CALL | `krCnclClInfFileOput(kr_cncl_cl_inf.toString(), mid_dir_kk)` // Write temporary cancellation cancel file // 工事仮キャンセル取消情報設定ファイル出力 |

**Block 6** — [TERMINATION] (L386)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("execute_END")` // End debug log |
| 2 | RETURN | `return null` // Always returns null (batch completion signal) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `rec_div` | Field | Record division — 2-character code classifying the type of construction-related information in each CSV row |
| `free_item` | Field | Free item — configurable directory path from `JBSbatCommonItem` used as intermediate file staging area |
| `mid_dir_kk` | Field | Intermediate file storage directory for construction-related output files |
| `naibu_receive_dir_kk` | Field | Internal I/F (interface) receive directory where the input file is expected |
| `data_list` | Field | ArrayList of parsed, quote-stripped CSV field values for the current row |
| OPMS | Acronym | Optical Network Terminal Operations, Administration, and Maintenance Platform — hard-keeper (persistent state) system for optical network equipment |
| STB | Acronym | Set-Top Box — consumer electronics device for receiving television signals, referenced in installation records |
| KKIF* | Abbreviation | K-Opticom file ID prefix for construction/knowledge-related batch files (KKI = Construction Information) |
| KKIFM* | Abbreviation | K-Opticom file ID prefix for construction-related intermediate/output files (KKI-M = Construction Intermediate/Medium) |
| KKIFI* | Abbreviation | K-Opticom file ID prefix for construction-related interface/inbound files (KKI-I = Construction Information Interface) |
| 宅内調査結果情報 | Field (JP) | Indoor survey result — field survey data collected at the customer premises for service installation planning |
| 設計設備情報 | Field (JP) | Design equipment info — planned/design-stage equipment configuration for the installation |
| 伝送設備情報 | Field (JP) | Transmission equipment info — transmission/telecom equipment details deployed during installation |
| 工事完了情報 | Field (JP) | Construction completion info — record indicating a construction/installation task has been completed |
| 工事予定情報(ネット) | Field (JP) | Construction schedule (Network) — planned/expected network installation date and details |
| 工事予定情報(テレビ) | Field (JP) | Construction schedule (TV) — planned/expected TV service installation date and details |
| 機器情報(ネット) | Field (JP) | Device/Terminal info (Network) — network device (NTU/ONU etc.) configuration and serial data |
| 機器情報(テレビ) | Field (JP) | Device/Terminal info (TV) — TV-related terminal device configuration and serial data |
| 工事取消情報 | Field (JP) | Construction cancellation info — record of a cancelled construction/installation task |
| 宅内工事情報 | Field (JP) | Indoor construction info — details of indoor wiring/construction work performed |
| 工事費情報 | Field (JP) | Construction cost info — billing/cost data associated with the construction work |
| STB着工情報 | Field (JP) | STB installation start info — record indicating STB installation has commenced |
| 工事仮キャンセル受領情報 | Field (JP) | Temporary cancellation receipt — record of a provisional/interim cancellation that has been received |
| 工事仮キャンセル取消情報 | Field (JP) | Temporary cancellation cancel — record cancelling a previously received temporary cancellation |
| `KOJI_KNRN_INF_RCV_FILE_ID` | Constant | `"KKIFI023001"` — File ID for the construction-related information reception (inbound) file |
| `TAK_CHO_RSLT_INF__FILE_ID` | Constant | `"KKIFM052001"` — File ID for indoor survey result output file |
| `DSGN_EQUIP_INF_FILE_ID` | Constant | `"KKIFM059001"` — File ID for design equipment info output file |
| `DENSO_EQUIP_INF_FILE_ID` | Constant | `"KKIFM060001"` — File ID for transmission equipment info output file |
| `KOJI_FIN_INF_FILE_ID` | Constant | `"KKIFM051001"` — File ID for construction completion info output file |
| `KOJI_RSV_INF_NET_FILE_ID` | Constant | `"KKIFM061001"` — File ID for construction schedule (Network) output file |
| `KOJI_RSV_INF_TV_FILE_ID` | Constant | `"KKIFM062001"` — File ID for construction schedule (TV) output file |
| `KIKI_INF_NET_FILE_ID` | Constant | `"KKIFM063001"` — File ID for device info (Network) output file |
| `KIKI_INF_TV_FILE_ID` | Constant | `"KKIFM064001"` — File ID for device info (TV) output file |
| `KOJI_CL_INF_FILE_ID` | Constant | `"KKIFM065001"` — File ID for construction cancellation info output file |
| `TAKNI_KOJI_INF_FILE_ID` | Constant | `"KKIFM066001"` — File ID for indoor construction info output file |
| `KOJIHI_INF_FILE_ID` | Constant | `"KKIFM067001"` — File ID for construction cost info output file |
| `STB_CHAKUKO_INF_FILE_ID` | Constant | `"KKIFM166001"` — File ID for STB installation info output file |
| `KR_CNCL_UK_FILE_ID` | Constant | `"KKIFM770001"` — File ID for temporary cancellation receipt output file |
| `KR_CNCL_CL_FILE_ID` | Constant | `"KKIFM771001"` — File ID for temporary cancellation cancel output file |
| `FILE_KEISHIKI` | Constant | `".csv"` — File extension suffix |
| `CONMA` | Constant | `","` — Comma character used as CSV delimiter |
| `JBSbatBusinessService` | Class | Parent batch service class providing common infrastructure: `getInputFile`, `executeOutputFile`, `printDebugLog`, `opeDate`, `ENCODE` |
| `JBSbatCommonItem` | Class | Framework item class carrying batch runtime configuration including `freeItem` directory path |
| `JBSbatOutputItem` | Class | Framework output item class; this method returns `null` as it signals completion via file output, not return value |
