# Business Logic — JBSbatKKKjFinDataInTrn.insertKktkSvcKeiDsl() [254 LOC]

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

## 1. Role

### JBSbatKKKjFinDataInTrn.insertKktkSvcKeiDsl()

This method records a **machine-provided service contract line item** (`KKTK_SVC_KEI`) for DSL (Digital Subscriber Line) broadband services during batch-processing of installation/transfer completion data. It is a **dedicated DSL insertion method**, as opposed to general-purpose service contract registration — the name "Dsl" suffix identifies this as the DSL-specific branch.

The method operates as a **data-to-table mapper** with three distinct phases: (1) date calculation, where it computes the effective plan-end date and plan-charge-end date by subtracting one calendar day from the service-start and charge-start dates (since DSL plans are active from start date through one day before end date); (2) penalty resolution, where it determines the breach-penalty occurrence code either directly from the input parameter (if explicitly set to "0"/no penalty) or by cross-referencing the machine-provided service code against the service master table to retrieve the `PNLTY_HASSEI_UM` flag; and (3) bulk parameter assembly, where it extracts approximately 120 fields from the incoming service-contract map, trims them, intermixes computed values, and inserts a single row into the `KK_T_KKTK_SVC_KEI` (machine-provided service contract line item) table.

Its **role in the larger system** is as a shared service utility invoked by `execute()`, the primary batch processing entry point. The method implements a **delegation pattern** — it does not directly execute SQL but delegates to `executeKK_T_KKTK_SVC_KEI_PKINSERT()`, which wraps the database insertion. It also implements a **lookup-before-decide pattern** for penalty determination: when the caller does not explicitly provide a "no penalty" flag, the method resolves the correct value from master data.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["insertKktkSvcKeiDsl"]) --> GET_SYS_DATE["Get system date timestamp"]
    GET_SYS_DATE --> CALC_PLAN_END["Calculate planEndymd = planStaymd - 1 day"]
    CALC_PLAN_END --> CALC_CHRG_END["Calculate planChrgEndymd = planChrgStaymd - 1 day"]
    CALC_CHRG_END --> DEBUG_LOG_1["Debug log service contract number"]
    DEBUG_LOG_1 --> DEBUG_LOG_2["Debug log planEndymd"]
    DEBUG_LOG_2 --> DEBUG_LOG_3["Debug log planChrgEndymd"]
    DEBUG_LOG_3 --> CHECK_PNLTY{"pnltyHasseiCd equals 0?"}

    CHECK_PNLTY -->|Yes| SET_PNLTY_0["Set pnlty_hassei_cd = 0"]
    CHECK_PNLTY -->|No| GET_SVC_CD["Get kktkSvcCd from map"]
    GET_SVC_CD --> BUILD_PARAM["Build param array kktkSvcCd"]
    BUILD_PARAM --> CALL_PKSELECT["executeKK_M_KKTK_SVC_PKSELECT param"]
    CALL_PKSELECT --> CHECK_RESULT{result null?}
    CHECK_RESULT -->|Yes| GET_PNLTY_FROM_MAP["Get PNLTY_HASSEI_UM from map"]
    CHECK_RESULT -->|No| SET_PNLTY_EMPTY["pnlty_hassei_cd stays empty"]
    GET_PNLTY_FROM_MAP --> SET_PNLTY_RESULT["Set pnlty_hassei_cd from PNLTY_HASSEI_UM"]

    SET_PNLTY_0 --> BUILD_SET_PARAM["Build setParam array 120 fields"]
    SET_PNLTY_RESULT --> BUILD_SET_PARAM
    SET_PNLTY_EMPTY --> BUILD_SET_PARAM

    BUILD_SET_PARAM --> EXEC_INSERT["executeKK_T_KKTK_SVC_KEI_PKINSERT"]
    EXEC_INSERT --> DEBUG_END["Debug log END"]
    DEBUG_END --> END_NODE(["Return void"])
```

**Processing Summary:**

1. **System timestamp acquisition** — Gets the current system date-time stamp via `JCCBatCommon.getSysDateTimeStamp()`.
2. **Plan-end date calculation** — Computes `planEndymd` as the day before `planStaymd` (the service-start date from the incoming contract), because DSL service plans are effective from the start date through the day before the end date. Similarly computes `planChrgEndymd` as one day before `planChrgStaymd` (the charge-start date).
3. **Debug logging** — Logs the machine-provided service contract number (`KKTK_SVC_KEI_NO`), the computed `planEndymd`, and `planChrgEndymd`.
4. **Penalty occurrence code resolution** (conditional branch):
   - If `pnltyHasseiCd` equals `"0"` (CD01375_PNLTY_HASSEI_CD_0 — "no penalty"), sets `pnlty_hassei_cd = "0"` directly.
   - Otherwise, looks up the machine-provided service code (`KKTK_SVC_CD`), queries the service master table via `executeKK_M_KKTK_SVC_PKSELECT()`, and extracts the `PNLTY_HASSEI_UM` (penalty occurrence flag) from the result.
5. **Bulk parameter assembly** — Constructs a ~120-element Object array with all fields required to insert a row into `KK_T_KKTK_SVC_KEI`. This includes: service contract identifiers, status code "910", plan dates, penalty code, equipment details, customer address, installation location, delivery dates, trial/permanent connection dates, pause status, and cancellation reasons.
6. **Insert execution** — Delegates to `executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)` to perform the database insert.
7. **Final debug logging** — Logs completion marker.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `kktkSvcKei_map` | `JBSbatCommonDBInterface` | Machine-provided service contract line item data map — the primary data source containing ~100+ fields describing a DSL service contract (contract number, service code, plan code, equipment IDs, customer address, installation details, dates, pause/cancel status). This map originates from the data feed received from the machine-provided (carrier) system. |
| 2 | `mskmDtlNo` | `String` | Machine-provided detail number — identifies the specific service detail record for billing/accounting purposes. Passed through as-is into the inserted record. |
| 3 | `idoDiv` | `String` | Installation/division code — classifies the type of equipment movement or installation event (e.g., new installation, transfer/migration, replacement). Affects how the service line item is recorded. |
| 4 | `pnltyHasseiCd` | `String` | Penalty occurrence code — input hint about whether a breach-penalty applies. When set to `"0"`, indicates no penalty. When set to any other value (including `"1"` — penalty has occurred), the method falls through to the service master lookup to get the authoritative penalty flag. |
| 5 | `planStaymd` | `String` | Plan service-start date (YYYYMMDD) — the date from which the service contract becomes active. Used to compute `planEndymd` (effective end date = planStaymd - 1 day). |
| 6 | `planChrgStaymd` | `String` | Plan charge-start date (YYYYMMDD) — the date from which billing for the service plan begins. Used to compute `planChrgEndymd` (effective charge end date = planChrgStaymd - 1 day). |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `super.logPrint` | Debug log interface | Inherited debug logging facility used throughout the method for step-by-step audit trail. |
| `super.opeDate` | `String` (YYYYMMDD) | Operation date — used as the "reservation application date" field in the insert. Represents the batch run date or operational processing date. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCBatCommon.getSysDateTimeStamp` | JCCBatCommon | - | Gets current system date-time stamp for audit timestamp |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Reads string value from move navigation data map |
| R | `JBSbatKKKjFinDataInTrn.executeKK_M_KKTK_SVC_PKSELECT` | EKK0361A010SC | KK_M_KKTK_SVC | Queries the machine-provided service master table (KK_M_KKTK_SVC) to retrieve the penalty occurrence flag (PNLTY_HASSEI_UM) for a given service code. This is the only database-read operation with a specific entity. |
| R | `JBSbatZMAdDataSet.getString` | JBSbatZMAdDataSet | - | Reads string value from address data set map |
| C | `JBSbatKKKjFinDataInTrn.executeKK_T_KKTK_SVC_KEI_PKINSERT` | EKK0361A020CBS | KK_T_KKTK_SVC_KEI | Inserts a complete row into the machine-provided service contract line item table (KK_T_KKTK_SVC_KEI) with ~120 field values. This is the primary CREATE operation of the method. |
| R | `JESC0101B010TPMA.getString` | JESC0101B010TPMA | - | Reads string value from equipment service data |
| R | `JESC0101B020TPMA.getString` | JESC0101B020TPMA | - | Reads string value from equipment service data |
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Reads string value from case file ranking data |
| R | `JACModelCommon.getSysDateTimeStamp` | JACModelCommon | - | Gets system date-time stamp |
| R | `JCCModelCommon.getSysDateTimeStamp` | JCCModelCommon | - | Gets system date-time stamp |
| R | `JCHModelCommon.getSysDateTimeStamp` | JCHModelCommon | - | Gets system date-time stamp |
| R | `JCCBPCommon.getSysDateTimeStamp` | JCCBPCommon | - | Gets system date-time stamp |

**Additional method calls (utility/debug):**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatStringUtil.Rtrim` | JBSbatStringUtil | - | Trims whitespace from string values (called ~100+ times for field sanitization) |
| - | `JBSbatDateUtil.adjustDate` | JBSbatDateUtil | - | Adjusts date by offset (used to compute -1 day for plan-end dates, +1 day for service termination date) |
| - | `JACBatCommon.printDebugLog` | JACBatCommon | - | Debug logging utility calls |
| - | `JACbatDebugLogUtil.printDebugLog` | JACbatDebugLog | - | Debug logging utility calls |
| - | `JCKLcsRenkeiUtil.printDebugLog` | JCKLcsRenkei | - | Debug logging utility calls |
| - | `JKKHttpCommunicator.printDebugLog` | JKKHttpCommunicator | - | Debug logging utility calls |
| - | `JBSbatKKCashPostAddMail.printDebugLog` | JBSbatKKCashPostAddMail | - | Debug logging utility calls |
| - | `JKKShkaFinJiKikiStaAddCC.adjustDate` | JKKShkaFinJiKikiStaAddCC | - | Date adjustment utility |
| - | `JKKSyuKeiStabunKikiStaAddCC.adjustDate` | JKKSyuKeiStabunKikiStaAddCC | - | Date adjustment utility |
| - | `JPCEditString.Rtrim` | JPCEditString | - | String trim utility |
| - | `JPCUtilCommon.Rtrim` | JPCUtilCommon | - | String trim utility |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch:JBSbatKKKjFinDataInTrn.execute() | `execute()` -> `insertKktkSvcKeiDsl(kktkSvcKei_map, mskmDtlNo, idoDiv, pnltyHasseiCd, planStaymd, planChrgStaymd)` | `executeKK_T_KKTK_SVC_KEI_PKINSERT [C] KK_T_KKTK_SVC_KEI`, `executeKK_M_KKTK_SVC_PKSELECT [R] KK_M_KKTK_SVC` |

**Explanation:** The method is called directly from `JBSbatKKKjFinDataInTrn.execute()`, which is the primary batch processing method of this class. This is a batch entry point (not a screen-based CBS). The terminal operations reach two database tables: the primary insert into `KK_T_KKTK_SVC_KEI` and a lookup into `KK_M_KKTK_SVC` (service master).

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] System timestamp acquisition (L10666)

> Retrieves the current system date-time stamp for use as the audit/update timestamp in the inserted record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysDate = JCCBatCommon.getSysDateTimeStamp()` |

**Block 2** — [SET] Initialize plan-end date variables (L10669–10670)

> Declares two date variables that will hold the computed plan-end dates. Initialized to empty strings as default.

| # | Type | Code |
|---|------|------|
| 1 | SET | `planEndymd = ""` // Plan end date (YYYYMMDD) |
| 2 | SET | `planChrgEndymd = ""` // Plan charge end date (YYYYMMDD) |

**Block 3** — [SET] Calculate plan-end date (L10673–10674)

> Computes the effective plan end date by subtracting one day from the service-start date. DSL plans are active from `planStaymd` through the day before the plan-end date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `planEndymd = JBSbatDateUtil.adjustDate(planStaymd, -1)` // planStaymd minus 1 day |

**Block 4** — [SET] Calculate plan-charge-end date (L10677–10678)

> Computes the effective plan-charge end date by subtracting one day from the charge-start date, mirroring the plan-end date calculation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `planChrgEndymd = JBSbatDateUtil.adjustDate(planChrgStaymd, -1)` // planChrgStaymd minus 1 day |

**Block 5** — [EXEC] Debug logging (L10680–10682)

> Logs the machine-provided service contract number, the computed plan-end date, and the computed plan-charge-end date for audit/debugging purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Machine-provided service contract number: " + Rtrim(kktkSvcKei_map.getString(KKTK_SVC_KEI_NO)))` |
| 2 | EXEC | `super.logPrint.printDebugLog("Plan end date: " + planEndymd)` |
| 3 | EXEC | `super.logPrint.printDebugLog("Plan charge end date: " + planChrgEndymd)` |

**Block 6** — [SET] Initialize penalty code variable (L10687)

> Sets up the penalty occurrence code variable. OM-2013-0004088対応 (OM-2013-0004088 response).

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnlty_hassei_cd = ""` // Penalty occurrence code |

**Block 7** — [IF] Penalty occurrence code resolution (L10698)

> CD01375_PNLTY_HASSEI_CD_0 = "0" (No penalty). When the input `pnltyHasseiCd` equals "0", the penalty flag is set directly. Otherwise, the method queries the service master table to determine the actual penalty occurrence flag from the machine-provided service master data.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JBSbatKKConst.CD01375_PNLTY_HASSEI_CD_0.equals(pnltyHasseiCd)` [CD01375_PNLTY_HASSEI_CD_0 = "0" (No penalty)] (L10698) |

**Block 7.1** — [IF branch: Yes] Direct penalty code (L10699–10701)

> When no penalty applies, set the penalty occurrence code to "0".

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnlty_hassei_cd = JBSbatKKConst.CD01375_PNLTY_HASSEI_CD_0` [="0"] |

**Block 7.2** — [IF branch: No] Lookup penalty from service master (L10704–10711)

> When the penalty code is not explicitly "0", resolve the authoritative penalty occurrence flag by: (a) extracting the machine-provided service code (`KKTK_SVC_CD`) from the input map, (b) querying the service master table via `executeKK_M_KKTK_SVC_PKSELECT`, and (c) extracting the `PNLTY_HASSEI_UM` flag. EKK0361A010SC (Service master lookup).

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktk_svc_cd = Rtrim(kktkSvcKei_map.getString(KKTK_SVC_CD))` |
| 2 | SET | `param = new String[]{kktk_svc_cd}` |
| 3 | EXEC | `pnltyHasseiUmMap = executeKK_M_KKTK_SVC_PKSELECT(param)` [SC: EKK0361A010SC, Entity: KK_M_KKTK_SVC] |

**Block 7.2.1** — [IF] Null check on lookup result (L10708–10710)

> If the service master lookup returns a valid result, extract the penalty occurrence flag. If null (should not happen), `pnlty_hassei_cd` remains empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `pnltyHasseiUmMap != null` (L10708) |
| 2 | SET | `pnlty_hassei_cd = Rtrim(pnltyHasseiUmMap.getString(PNLTY_HASSEI_UM))` // from master data |

**Block 8** — [SET] Build parameter array for insert (L10714–L10909)

> Assembles the complete parameter array (~120 fields) for inserting a machine-provided service contract line item into `KK_T_KKTK_SVC_KEI`. This is the core data-mapping block. Fields are extracted from `kktkSvcKei_map`, trimmed of whitespace, and intermixed with computed/hardcoded values.

Key field groups in the array:

| # | Position | Field Source | Business Meaning |
|---|----------|-------------|-----------------|
| 1 | [0] | `KKTK_SVC_KEI_NO` | Service contract line item number |
| 2 | [1] | `sysDate` | System date-time stamp (audit) |
| 3 | [2] | `JBSbatKKConst.CD00056_KKTK_SVC_KEI_STAT_910` [="910"] | Status code "910" — Equipment Operation Service Contract Status (status indicator for registered line items) |
| 4 | [3] | `KKTK_SVC_CD` | Machine-provided service code |
| 5 | [4] | `PCRS_CD` | Contract code |
| 6 | [5] | `PPLAN_CD` | Plan code |
| 7 | [6] | `TK_HOSHIKI_KEI_NO` | Equipment management line item number |
| 8 | [7] | `KKTK_SBT_CD` | Machine-provided sub-service code |
| 9 | [8] | `HAMBAI_SBT_CD` | Sales sub-service code |
| 10 | [9] | `SVC_USE_STA_KIBO_YMD` | Service use start desired date |
| 11 | [10] | `RSV_TSTA_KIBO_YMD` | Reservation trial start desired date |
| 12 | [11] | `KIBO_MAKER_CD` | Desired manufacturer code |
| 13 | [12] | `KIKI_SHITEI_SBT_CD` | Equipment designation sub-service code |
| 14 | [13-15] | `Taknkiki` fields | Lease equipment type/model codes |
| 15 | [16] | `KIKI_SEIZO_NO` | Equipment serial number |
| 16 | [17-18] | `HUZOKUHIN` fields | Attached device type/model codes |
| 17 | [19] | `KIKI_CHG_NO` | Equipment change number |
| 18 | [20] | `KIKI_CHG_RSN_CD` | Equipment change reason code |
| 19 | [21] | `TSUSHIN_KIKI_SET_CD` | Communication equipment set code |
| 20 | [22] | `HDD_CAPA_CD` | HDD capacity code |
| 21 | [23] | `KIKI_STC_SAKI_PLACE_NO` | Equipment installation location number |
| 22 | [24] | `OYA_KEI_SKBT_CD` | Parent contract sub-service code |
| 23 | [25] | `SVC_KEI_NO` | Service line item number |
| 24 | [26] | `SVC_KEI_UCWK_NO` | Service detail work number |
| 25 | [27] | `SVC_KEI_KAISEN_UCWK_NO` | Service line improvement work number |
| 26 | [28] | `OP_SVC_KEI_NO` | Open service line item number |
| 27 | [29] | `SYSID` | System ID |
| 28 | [30] | `mskmDtlNo` | Machine-provided detail number |
| 29 | [31-32] | `LINK_STB_FLG`, `KIKI_HKAT_SHITEI_*` | STB link flag, equipment home installation designation |
| 30 | [33-36] | `KIKI_STI_JI_*` fields | Equipment on-site inspection codes |
| 31 | [37] | `KKTK_SVC_KEI_HKHASYMD` | Machine-provided service contract issue date |
| 32 | [38-45] | `KIKI_SORYO` fields | Equipment contract details (cost, preparation date, owner name/address/contact) |
| 33 | [46-47] | `KIKI_SHS_AD_MAN_INPUT_FLG`, `KIKI_SOHUS_TELNO` | Address manual input flag, phone number |
| 34 | [48] | `MANSION_BUKKEN_NO` | Mansion property number |
| 35 | [49-51] | `KIKI_SOHUS_KSH_AD_SAI_FLG`, `KIKI_SHS_KBT_SHITEI_FLG`, `KIKI_SHS_HSK_*` | Relocation flag, BT designation, installation codes |
| 36 | [52-60] | `KIKI_STC_SAKI_*` fields | Equipment installation site name/address/contact details |
| 37 | [61-62] | `KIKI_STC_SK_*` fields | Installation site sub-key phone and relocation flags |
| 38 | [63] | `KIKI_STS_KKK_SEIRI_CHU_FLG` | Equipment processing intermediate flag |
| 39 | [64] | `AD_MI_FIX_FLG` | Address minor fix flag |
| 40 | [65] | `AUTO_ADD_CD` | Auto-add code |
| 41 | [66] | `AD_MI_FIX_RLS_YMD` | Address minor fix release date |
| 42 | [67] | `CHRG_STA_YMD_HOSEI_UM` | Charge start date correction flag |
| 43 | [68-70] | `KIKI_STS_HSK_*` fields | Equipment processing installation codes |
| 44 | [71] | `KKTK_SVC_KEI_KZKWRK_REQYMD` | Machine-provided contract work request date |
| 45 | [72-73] | `SHOSA_YMD`, `SHOSA_CL_YMD` | Survey date, survey completion date |
| 46 | [74-77] | `HAISO_*` fields | Delivery division, request date, arrival designation date |
| 47 | [78-81] | `FTRIAL_*`, `HONKANYU_*` fields | Free trial entry/end date, permanent connection date, permanent connection deadline |
| 48 | [82] | `KEI_CNC_YMD` | Contract cancellation date |
| 49 | [83] | `JCCC_KANYU_BUNSHO_YMD` | JCCC receiving document date |
| 50 | [84] | `HOSHO_CD` | Guarantee code |
| 51 | [85] | `KKTK_SVKEI_HOKI` | Machine-provided service supplement |
| 52 | [86-87] | `HOSHO_STAYMD`, `HOSHO_END_YMD` | Guarantee start/end date |
| 53 | [88] | `super.opeDate` | Operation date (reserved application date) |
| 54 | [89-91] | `RSV_CL_YMD`, `RSV_APLY_CD`, `KIKI_CHG_YMD` | Reservation completion date, reservation application code, equipment change date |
| 55 | [92-94] | `PLAN_STAYMD`, `planEndymd`, `PLAN_CHRG_STAYMD` | Plan start date, plan end date, plan charge start date |
| 56 | [95] | `planChrgEndymd` | Plan charge end date |
| 57 | [96] | `JBSbatKKConst.PLAN_END_SBT_CD_MSDDSL` [="2"] | Plan end type code — MSDDSL (MSD DSL plan end) |
| 58 | [97-98] | `SVC_CANCEL_YMD`, `SVC_CANCEL_RSN_CD` | Service cancellation date, cancellation reason code |
| 59 | [99-104] | `SVC_*` date/status fields | Service start/completion dates, charge start date, stop date, fail sub-service code |
| 60 | [105-109] | `SVC_*` stop/pause fields | Stop reason/release dates, pause code, pause date/reason/memo/release details |
| 61 | [110-111] | `planEndymd`, `planChrgEndymd` | Service end date and service charge end date (reused) |
| 62 | [112] | `JBSbatDateUtil.adjustDate(planChrgEndymd, 1)` | Service termination date (charge end date + 1 day) |
| 63 | [113] | `JBSbatKKConst.SVC_DLRE_CD_NORMAL` [="01"] | Service deregistration reason code — Normal (Ordinary termination) |
| 64 | [114] | `SVC_DLRE_MEMO` | Service deregistration memo |
| 65 | [115] | `ZANCHI_FLG` | Remainder flag |
| 66 | [116] | `SVC_DSL_TTDKI_FIN_FLG` | Service DSL device completion flag |
| 67 | [117] | `""` | Recovery date (hardcoded empty — KaihkYMD) |
| 68 | [118-119] | `SVC_CANCEL_CL_YMD`, `SVC_DSL_CL_YMD` | Service cancellation completion date, DSL completion date |
| 69 | [120] | `SKEKKA_SEND_CD` | Billing send code |
| 70 | [121] | `SVC_PAUSE_CHRG_STA_YMD` | Service pause charge start date |
| 71 | [122] | `pnlty_hassei_cd` | Penalty occurrence code (resolved in Block 7) |
| 72 | [123-124] | `KIKI_NINSHO_ID`, `KIKI_NINSHO_ID_PWD` | Equipment acknowledgment ID/password |
| 73 | [125] | `idoDiv` | Installation/division code (input parameter) |
| 74 | [126-129] | `KKST_JSEKI_UK_YMD`, `EO_TV_KKST_SNN_STAT_CD`, `KKST_SNN_YMD`, `TAKNKIKI_IDO_CD` | Settlement account lock date, EO TV settlement status code, settlement date, lease equipment transfer code |
| 75 | [130-133] | `CAS_CARD_USE_KYODAK_YMD`, `KIKI_HUKA_INFO_CD`, `SHOSA_DSL_FIN_CD`, `ROUTER_*` | CAS card usage request date, additional equipment info, survey DSL completion code, router DSL reservation status/result |
| 76 | [134-136] | `HAISO_WAY_CD`, `KIKI_ITENS_MV_JSSIS_SKCD`, `KAISHU_KIKI_UM` | Delivery method, inter-office equipment migration code, leased equipment cost |
| 77 | [137-138] | `HAISO_REQ_SHITEI_YMD`, `SHKA_FIN_JI_SYRZM_FLG` | Delivery request designation date, settlement finance acknowledgment flag |
| 78 | [139] | `SVC_STA_JI_HIS_JOKYO_SKCD` | Service start acknowledgment history status code |
| 79 | [140-145] | `""` | Empty placeholder fields |
| 80 | [146] | `JBSbatKKConst.MK_FLG_YK` [="0"] | Move/transfer flag — No (YK = no transfer) |
| 81 | [147-150] | `""` | Empty placeholder fields |
| 82 | [151] | `HCPRD_STAD_SNSTSTD_YMD` | High-capacity plan start notification standard start date |
| 83 | [152-153] | `HCPRD_STAD_SNSTSTD_YMD_IKF`, `HCPRD_STAD_SNSTSTD_YMD_SCD` | Notification standard start dates (1st attempt, 2nd attempt) |

> [Omitted ~120 field values in detail — see source code at lines 10714–10909 for the complete parameter array]

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParam = { /* ~120 field values, see table above */ }` // Build insert parameters |

**Block 9** — [CALL] Execute insert (L10913)

> Delegates to the insert method to persist the assembled parameter array into the `KK_T_KKTK_SVC_KEI` table. EKK0361A020CBS.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)` [SC: EKK0361A020CBS, Entity: KK_T_KKTK_SVC_KEI, CRUD: Create] |

**Block 10** — [EXEC] Final debug logging (L10915)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("insertKktkSvcKeiDsl_END")` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKTK_SVC_KEI_NO` | Field | Machine-provided service contract line item number — unique identifier for a DSL service contract line item |
| `KKTK_SVC_CD` | Field | Machine-provided service code — classifies the type of service (DSL, FTTH, Cable, etc.) |
| `KKTK_SVC_KEI_HKHASYMD` | Field | Machine-provided service contract issue date — when the contract was originally issued |
| `KKTK_SVC_KEI_STAT` | Field | Service contract status — state indicator (910 = registered/active) |
| `KKTK_SBT_CD` | Field | Machine-provided sub-service code — specific service subtype code |
| `KK_M_KKTK_SVC` | DB | Machine-provided service master table — master data defining service codes, penalty flags, and service attributes |
| `KK_T_KKTK_SVC_KEI` | DB | Machine-provided service contract line item table — target table for DSL service contract line item inserts |
| `PNLTY_HASSEI_UM` | Field | Penalty occurrence unison master flag — master data flag indicating whether a breach penalty applies to a service code |
| `planStaymd` | Field | Plan service-start date (YYYYMMDD) — the date from which the service plan becomes effective |
| `planChrgStaymd` | Field | Plan charge-start date (YYYYMMDD) — the date from which billing for the service plan begins |
| `planEndymd` | Field | Plan effective end date — computed as planStaymd minus 1 day |
| `planChrgEndymd` | Field | Plan charge effective end date — computed as planChrgStaymd minus 1 day |
| `CD01375_PNLTY_HASSEI_CD_0` | Constant | Penalty occurrence code = "0" (No penalty) |
| `CD00056_KKTK_SVC_KEI_STAT_910` | Constant | Service contract status = "910" (Equipment Operation Service Contract — active/registered status) |
| `PLAN_END_SBT_CD_MSDDSL` | Constant | Plan end type code = "2" (MSD DSL plan end — Multi-Service DSL subscription plan termination) |
| `SVC_DLRE_CD_NORMAL` | Constant | Service deregistration/cancellation reason code = "01" (Normal/Ordinary termination) |
| `MK_FLG_YK` | Constant | Move/transfer flag = "0" (No move/transfer) |
| `idoDiv` | Field | Installation/division code — classifies the type of installation or equipment movement event |
| `pnltyHasseiCd` | Field | Penalty occurrence code (input parameter) — whether a breach penalty has been declared |
| `pnlty_hassei_cd` | Field | Penalty occurrence code (internal variable) — resolved penalty flag after conditional branch |
| `mskmDtlNo` | Field | Machine-provided detail number — billing/accounting detail record identifier |
| `KIKI` | Acronym | Equipment — refers to customer-premises equipment (CPE) such as modems, routers, set-top boxes |
| `SVC_KEI` | Acronym | Service line item — a single service contract entry (as opposed to the parent contract) |
| `DSl` | Business term | Digital Subscriber Line — broadband internet service delivered over telephone lines |
| `MSDDSL` | Business term | Multi-Service DSL — a bundled DSL service plan offering |
| `JCCC` | Acronym | Joint Customer Communications Center — shared telecommunications coordination entity |
| `HKY` / `Kaihk` | Field | Recovery/Restoration date — date when service is restored (here hardcoded empty) |
| `HAISO` | Field | Delivery — refers to equipment delivery scheduling (date, method, arrival designation) |
| `FTRIAL` | Field | Free trial — refers to the free trial period for the service (entry date, end date) |
| `HONKANYU` | Field | Permanent connection — the final activation of the service connection |
| `KEI_CNC` | Field | Contract cancellation — date when the service contract was cancelled |
| `KIKI_STC_SAKI` | Field | Equipment installation site — the physical location where equipment is installed |
| `KIKI_SOHUS` | Field | Equipment owner — customer information (name, address, phone) |
| `CHRG` | Acronym | Charge/Billing — refers to billing-related dates and codes |
| `SVC_STP` | Field | Service stop — service suspension dates and reason codes |
| `SVC_PAUSE` | Field | Service pause — service pause dates, reasons, and memo fields |
| `ZANCHI_FLG` | Field | Remainder flag — indicates remaining balance or remainder status |
| `SVC_DSL_TTDKI_FIN_FLG` | Field | Service DSL device completion flag — indicates whether DSL device setup is complete |
| `SHOSA` | Field | Survey — refers to site survey dates for installation planning |
| `EO_TV` | Field | EO TV — Ethernet Over Line television service (cable TV delivered over network) |
| `TAKNKIKI` | Field | Lease equipment — equipment provided under a leasing arrangement |
| `KIBO` | Field | Desired/Request — refers to customer's desired dates or specifications |
| `RSV` | Field | Reservation — refers to reservation-related dates and application codes |
| `JSSIS` | Field | Joint Shared Service Infrastructure System — shared telecom infrastructure system |
| `HCPRD` | Field | High-capacity plan — refers to premium/high-capacity service plans |
| `SNSTSTD_YMD` | Field | Notification standard start date — date when notification standards take effect |
| `SKEKKA` | Field | Billing settlement — refers to billing settlement distribution codes |
| `CAS_CARD` | Field | CAS (Conditional Access System) card — smart card for authorized service access |
