# Business Logic — JBSbatKKSyuKeiJudgeTran.initial() [53 LOC]

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

## 1. Role

### JBSbatKKSyuKeiJudgeTran.initial()

The `initial` method serves as the **entry-point initialization routine** for the **main contract judgment batch** (`JBSbatKKSyuKeiJudgeTran`) — the core component responsible for evaluating and deciding processing routes for telecom service contracts within the K-Opticom e Customer Core System. Its business purpose is to establish the full runtime environment needed before the main `execute` pipeline runs: it configures shared common parameters, provisions database access layer objects against eight distinct tables, retrieves the set of processing group codes governing TV primary/secondary pricing setup, preprocesses SQL queries for service-contract-details and price-course lookups (injecting runtime parameters into SQL `IN` clauses), executes a price-course query to build a course-code-to-TV-course-group mapping, and reads a file of service contract numbers representing delayed course-change confirmations. The method follows a **straight-line sequential initialization pattern** with no conditional branches at the top level — it prepares all state (DB handles, maps, arrays, file-loaded lists) that downstream methods such as `execute`, `addPrg`, `setChTienList`, and `searchPrcGrpCd` consume. As a batch-service entry point, it is designed to be called once per batch invocation, acting as a shared utility setup that all batch processing stages depend on.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["initial(commonItem)"])
    SET1["setCommonInfo(commonItem)"]
    DB1["Create JBSbatSQLAccess: ZM_M_WORK_PARAM_KNRI"]
    DB2["Create JBSbatSQLAccess: KK_M_PCRS"]
    DB3["Create JBSbatSQLAccess: KK_M_PPLAN_KTTANKA"]
    DB4["Create JBSbatSQLAccess: KK_T_SVC_KEI_UCWK (x2)"]
    DB5["Create JBSbatSQLAccess: KK_T_PRG (x2)"]
    DB6["Create JBSbatSQLAccess: KK_T_SVC_KEI"]
    DB7["Create JBSbatSQLAccess: KK_T_SVKEI_EXC_CTRL"]
    INIT_STMT["Initialize stmt: KK_T_PRG"]
    SPGC["searchPrcGrpCd()"]
    SPGC_DETAIL["Query ZM_M_WORK_PARAM_KNRI for KK_SETP_PRC_GRP_CD"]
    SPGC_RESULT["Split work param value by comma into prg_grp_cd[]"]
    SQL1_EDIT["Edit SQL: KK_T_SVC_KEI_UCWK_KK_SELECT_093"]
    SQL2_EDIT["Edit SQL: KK_M_PCRS_KK_SELECT_007"]
    PPRS_COND["Create pcrsCondMap with prg_grp_cd[] + opeDate"]
    PPRS_SEL["selectBySqlDefine: KK_M_PCRS_KK_SELECT_007"]
    PPRS_MAP["Initialize pcrsMap HashMap"]
    PPRS_LOOP["while pcrsCdMap != null"]
    PPRS_FILTER["PCRS_CD not empty"]
    PPRS_PUT["pcrsMap.put(PCRS_CD -> TV_COURSE_GRP_CD)"]
    FILE_READ["Read filePath from commonItem.freeItem"]
    SETCHT["setChTienList(filePath)"]
    END_NODE(["Return / Next"])

    START --> SET1 --> DB1 --> DB2 --> DB3 --> DB4 --> DB5 --> DB6 --> DB7
    DB7 --> INIT_STMT --> SPGC --> SPGC_DETAIL --> SPGC_RESULT
    SPGC_RESULT --> SQL1_EDIT --> SQL2_EDIT --> PPRS_COND --> PPRS_SEL
    PPRS_SEL --> PPRS_MAP --> PPRS_LOOP
    PPRS_LOOP --> PPRS_FILTER
    PPRS_FILTER --> PPRS_PUT
    PPRS_PUT --> PPRS_LOOP
    PPRS_LOOP --> FILE_READ --> SETCHT --> END_NODE
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Source Location | Business Meaning |
|----------|---------------|-----------------|------------------|
| `KK_SETP_PRC_GRP_CD` | `"KK_SETP_PRC_GRP_CD"` | `JBSbatKKSyuKeiJudgeTran.java:169` | Key identifier for retrieving the pricing group code from the work parameter table |
| `ZM_M_WORK_PARAM_KNRI` | `"ZM_M_WORK_PARAM_KNRI"` | `JBSbatKKSyuKeiJudgeTran.java:92` | Table name — Business Parameter Management (work parameter control table) |
| `D_TBL_NAME_ZM_M_WORK_PARAM_KNRI` | `"ZM_M_WORK_PARAM_KNRI"` | `JBSbatKKSyuKeiJudgeTran.java:92` | Table name constant for ZM_M_WORK_PARAM_KNRI |
| `D_TBL_NAME_KK_M_PCRS` | `"KK_M_PCRS"` | `JBSbatKKSyuKeiJudgeTran.java:96` | Table name constant for Price Course master table |
| `D_TBL_NAME_KK_M_PPLAN_KTTANKA` | `"KK_M_PPLAN_KTTANKA"` | `JBSbatKKSyuKeiJudgeTran.java:100` | Table name constant for Price Plan Fixed Unit Price table |
| `D_TBL_NAME_KK_T_SVC_KEI_UCWK` | `"KK_T_SVC_KEI_UCWK"` | `JBSbatKKSyuKeiJudgeTran.java:104` | Table name constant for Service Contract Details table |
| `D_TBL_NAME_KK_T_PRG` | `"KK_T_PRG"` | `JBSbatKKSyuKeiJudgeTran.java:108` | Table name constant for Progress status table |
| `D_TBL_NAME_KK_T_SVC_KEI` | `"KK_T_SVC_KEI"` | `JBSbatKKSyuKeiJudgeTran.java:112` | Table name constant for Service Contract table |
| `D_TBL_NAME_KK_T_SVKEI_EXC_CTRL` | `"KK_T_SVKEI_EXC_CTRL"` | `JBSbatKKSyuKeiJudgeTran.java:154` | Table name constant for Service Contract Exception Control table |
| `KK_M_PCRS_KK_SELECT_007` | `"KK_SELECT_007"` | `JBSbatKKSyuKeiJudgeTran.java:119` | SQL definition key for price-course retrieval query |
| `KK_T_SVC_KEI_UCWK_KK_SELECT_093` | `"KK_SELECT_093"` | `JBSbatKKSyuKeiJudgeTran.java:127` | SQL definition key for service-contract-details preprocessing query |
| `EDIT_BF_SQL` | `"PRC_GRP_CD IN \\(\\?\\) "` | `JBSbatKKSyuKeiJudgeTran.java:159` | Before-edit SQL pattern — original IN clause with bind parameter placeholder |
| `EDIT_AF_SQL` | `"PRC_GRP_CD IN "` | `JBSbatKKSyuKeiJudgeTran.java:162` | After-edit SQL pattern — IN clause with expanded value list |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commonItem` | `JBSbatCommonItem` | The batch common parameter envelope carrying operational context for the entire batch run. It contains the operator date (`opeDate`), the database connection, free-item text fields (including `freeItem` which carries the file path for delayed course-change confirmation data), and other shared batch configuration values. This single object is passed to `super.setCommonInfo()` to populate the base service class, and then used to instantiate every `JBSbatSQLAccess` object for DB connectivity. |

**Instance fields / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `commonItem` (inherited) | `JBSbatCommonItem` | Reference to the shared batch common item, set by `super.setCommonInfo()` |
| `opeDate` (inherited) | `String` | Batch operation date, used as a query parameter in `searchPrcGrpCd()` and the PCRS condition map |
| `prg_grp_cd` | `String[]` | Populated by this method — the array of pricing group codes used to filter price-course queries |
| `pcrsMap` | `HashMap<String, String>` | Populated by this method — maps price-course codes to TV course group codes |
| `chTienList` | `ArrayList<String>` | Populated by `setChTienList()` — list of service contract numbers for delayed course-change confirmations |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatBusinessService.setCommonInfo` | JBSbatBusinessService | - | Calls `setCommonInfo` to copy `commonItem` into the parent service class (U) |
| R | `executeZM_M_WORK_PARAM_KNRI_KK_SELECT_002` | ZM_M_WORK_PARAM_KNRI | `ZM_M_WORK_PARAM_KNRI` | Executes SQL query `KK_SELECT_002` against the Business Parameter Management table to retrieve the pricing group code value (R) |
| R | `JBSbatZM_M_WORK_PARAM_KNRI.getString` | ZM_M_WORK_PARAM_KNRI | `ZM_M_WORK_PARAM_KNRI` | Reads the `WORK_PARAM_SETTE_VALUE` field from the parameter row (R) |
| R | `JBSbatSQLAccess.selectBySqlDefine` | KK_M_PCRS | `KK_M_PCRS` | Executes the preprocessed price-course query with pricing group code conditions (R) |
| R | `JBSbatSQLAccess.selectNext` | KK_M_PCRS | `KK_M_PCRS` | Fetches the next row from the price-course query result set in a loop (R) |
| R | `JBSbatKK_M_PCRS.getString` | KK_M_PCRS | `KK_M_PCRS` | Reads `PCRS_CD` (price course code) and `TV_COURSE_GRP_CD` (TV course group code) fields (R) |
| R | `JBSbatSQLAccess.getSql` | KK_T_SVC_KEI_UCWK | `KK_T_SVC_KEI_UCWK` | Retrieves the original SQL definition for key `KK_SELECT_093` to be preprocessed (R) |
| R | `JBSbatKKSyuKeiJudgeTran.getEditSQL` | JBSbatKKSyuKeiJudgeTran | - | Replaces bind-parameter placeholders in SQL with expanded value lists (R) |
| U | `JBSbatSQLAccess.setSqlMap` | KK_T_SVC_KEI_UCWK / KK_M_PCRS | `KK_T_SVC_KEI_UCWK`, `KK_M_PCRS` | Sets the preprocessed SQL definition back into the SQL access object (U) |
| C | `new JBSbatSQLAccess` | Various | `ZM_M_WORK_PARAM_KNRI`, `KK_M_PCRS`, `KK_M_PPLAN_KTTANKA`, `KK_T_SVC_KEI_UCWK`, `KK_T_PRG`, `KK_T_SVC_KEI`, `KK_T_SVKEI_EXC_CTRL` | Creates 9 SQL access handle objects for database table connectivity (C) |
| R | `JBSbatCommonItem.getFreeItem` | JBSbatCommonItem | - | Reads the free-item field containing the delayed course-change file path (R) |
| R | `JBSbatInputFileUtil.readLine` | JBSbatInputFileUtil | File (CSV) | Reads each line from the delayed course-change confirmation file (R) |
| C | `chTienList.add` | ArrayList | - | Adds parsed service contract numbers to the confirmation list (C) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: `JBSbatKKSyuKeiJudgeTran` | `JBSbatBusinessService.initial(commonItem)` → `JBSbatKKSyuKeiJudgeTran.initial(commonItem)` | `executeZM_M_WORK_PARAM_KNRI_KK_SELECT_002 [R] ZM_M_WORK_PARAM_KNRI`, `db_KK_M_PCRS.selectBySqlDefine [R] KK_M_PCRS` |

**Notes:** The `initial` method is defined as the override of the parent `JBSbatBusinessService.initial()` and is called as the first step of the batch lifecycle. No external screen (KKSV*) directly invokes this method — it is internal to the batch processing framework. The batch entry point (likely defined in a batch runner or batch configuration) calls `initial(commonItem)` before transitioning to the `execute` method.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET / EXEC] Initialize common info (L254)

> Sets up the parent service class with the incoming common parameter envelope.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.setCommonInfo(commonItem);` // Copies the batch common parameter into the parent service class |

**Block 2** — [SET] Generate database access handles (L257–L269)

> Creates `JBSbatSQLAccess` instances for all tables the batch will interact with. Each handle is bound to the `commonItem` connection and a specific table name.

| # | Type | Code |
|---|------|------|
| 1 | SET | `db_ZM_M_WORK_PARAM_KNRI = new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_M_WORK_PARAM_KNRI);` // [-> D_TBL_NAME_ZM_M_WORK_PARAM_KNRI="ZM_M_WORK_PARAM_KNRI"] (Business Parameter Management table) |
| 2 | SET | `db_KK_M_PCRS = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_M_PCRS);` // [-> D_TBL_NAME_KK_M_PCRS="KK_M_PCRS"] (Price Course master table) |
| 3 | SET | `db_KK_M_PPLAN_KTTANKA = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_M_PPLAN_KTTANKA);` // [-> D_TBL_NAME_KK_M_PPLAN_KTTANKA="KK_M_PPLAN_KTTANKA"] (Price Plan Fixed Unit Price table) |
| 4 | SET | `db_KK_T_SVC_KEI_UCWK = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_SVC_KEI_UCWK);` // [-> D_TBL_NAME_KK_T_SVC_KEI_UCWK="KK_T_SVC_KEI_UCWK"] (Service Contract Details table) |
| 5 | SET | `db_KK_T_SVC_KEI_UCWK_2 = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_SVC_KEI_UCWK);` // Duplicate handle for SQL preprocessing |
| 6 | SET | `db_KK_T_SVC_KEI_UCWK_110 = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_SVC_KEI_UCWK);` // Separate handle for KK_SELECT_110 operations |
| 7 | SET | `db_KK_T_PRG = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_PRG);` // [-> D_TBL_NAME_KK_T_PRG="KK_T_PRG"] (Progress table) |
| 8 | SET | `db_KK_T_SVC_KEI = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_SVC_KEI);` // [-> D_TBL_NAME_KK_T_SVC_KEI="KK_T_SVC_KEI"] (Service Contract table) |

**Block 3** — [SET] Initialize common-component statement handle (L273)

> Creates a separate `stmt` handle for the common component's progress table access (used by downstream methods like `getIdoDtmMax`).

| # | Type | Code |
|---|------|------|
| 1 | SET | `stmt = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_PRG);` // [-> D_TBL_NAME_KK_T_PRG="KK_T_PRG"] Common component progress handle |

**Block 4** — [CALL] Retrieve pricing group codes (L276)

> Retrieves the set of pricing group codes from the work parameter table. These codes determine which price-course rows to fetch for TV primary/secondary pricing setup.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `searchPrcGrpCd();` // Queries ZM_M_WORK_PARAM_KNRI for KK_SETP_PRC_GRP_CD, splits result by comma into prg_grp_cd[] |

**Block 4.1** — Nested: `searchPrcGrpCd()` internals (L1161–1176)

> Sub-block showing what `searchPrcGrpCd()` does internally:

| # | Type | Code |
|---|------|------|
| 1 | SET | `String[] param = new String[3];` // Parameter array for the work-param query |
| 2 | SET | `param[0] = KK_SETP_PRC_GRP_CD;` // [-> KK_SETP_PRC_GRP_CD="KK_SETP_PRC_GRP_CD"] Key to look up in work parameter table |
| 3 | SET | `param[1] = super.opeDate;` // Batch operation date |
| 4 | SET | `param[2] = super.opeDate;` // Batch operation date (used twice as start/end range) |
| 5 | CALL | `executeZM_M_WORK_PARAM_KNRI_KK_SELECT_002(param);` // Executes SQL to find the work parameter row |
| 6 | SET | `db_map = db_ZM_M_WORK_PARAM_KNRI.selectNext();` // Fetches the result row |
| 7 | IF | `if(null == db_map)` // [-> Condition: no matching work parameter found] |
| 8 | EXEC | `throw new JBSbatBusinessException(JPCBatchMessageConstant.EKKB0210CE, new String[]{ZM_M_WORK_PARAM_KNRI, STR_ZM_M_WORK_PARAM_KNRI_INFO + KK_SETP_PRC_GRP_CD});` // [-> JPCBatchMessageConstant.EKKB0210CE] Error if parameter not found |
| 9 | SET | `String tmpPrcGrpCd = db_map.getString(JBSbatZM_M_WORK_PARAM_KNRI.WORK_PARAM_SETTE_VALUE);` // Reads the pricing group code string |
| 10 | SET | `prg_grp_cd = tmpPrcGrpCd.split(",", -1);` // Splits comma-separated code list into array |

**Block 5** — [EXEC] Edit SQL for service contract details query (L279)

> Preprocesses the SQL definition for `KK_T_SVC_KEI_UCWK_KK_SELECT_093` by replacing bind-parameter placeholders with expanded values. The SQL is fetched, modified via `getEditSQL()`, and set back into the SQL access object.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `db_KK_T_SVC_KEI_UCWK_2.setSqlMap(KK_T_SVC_KEI_UCWK_KK_SELECT_093, getEditSQL(db_KK_T_SVC_KEI_UCWK_2.getSql(KK_T_SVC_KEI_UCWK_KK_SELECT_093)));` // [-> KK_T_SVC_KEI_UCWK_KK_SELECT_093="KK_SELECT_093"] Preprocess SQL: replace IN (?, ?, ...) with actual value list |

**Block 6** — [EXEC] Edit SQL for price-course query (L282)

> Preprocesses the SQL definition for `KK_M_PCRS_KK_SELECT_007` similarly to Block 5, preparing it for execution with the pricing group codes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `db_KK_M_PCRS.setSqlMap(KK_M_PCRS_KK_SELECT_007, getEditSQL(db_KK_M_PCRS.getSql(KK_M_PCRS_KK_SELECT_007)));` // [-> KK_M_PCRS_KK_SELECT_007="KK_SELECT_007"] Preprocess price-course query SQL |

**Block 7** — [SET / EXEC] Build PCRS condition map (L283–L287)

> Constructs a `JBSbatCommonDBInterface` condition map containing all pricing group codes plus the batch operation date. This map is used as the query parameter set for the price-course selection.

| # | Type | Code |
|---|------|------|
| 1 | SET | `JBSbatCommonDBInterface pcrsCondMap = new JBSbatCommonDBInterface();` // Condition parameter container |
| 2 | SET | `pcrsCondMap.setValue(prg_grp_cd[i]);` // for each i in prg_grp_cd: adds pricing group code values |
| 3 | EXEC | `for(int i = 0; i < prg_grp_cd.length; i++) { pcrsCondMap.setValue(prg_grp_cd[i]); }` // Loop over all pricing group codes |
| 4 | SET | `pcrsCondMap.setValue(super.opeDate);` // Appends the batch operation date as the final condition value |

**Block 8** — [EXEC / CALL] Execute price-course query (L288)

> Runs the preprocessed price-course query against the `KK_M_PCRS` table, filtering by pricing group codes and operation date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `db_KK_M_PCRS.selectBySqlDefine(pcrsCondMap, KK_M_PCRS_KK_SELECT_007);` // [-> KK_M_PCRS_KK_SELECT_007="KK_SELECT_007"] Executes the preprocessed query |

**Block 9** — [SET] Initialize PCRS result map (L289)

| # | Type | Code |
|---|------|------|
| 1 | SET | `pcrsMap = new HashMap<String, String>();` // Creates the mapping structure: key = price-course code, value = TV course group code |

**Block 10** — [SET / EXEC] Fetch first result row (L290)

| # | Type | Code |
|---|------|------|
| 1 | SET | `JBSbatCommonDBInterface pcrsCdMap = db_KK_M_PCRS.selectNext();` // Fetches the first row from the query result |

**Block 11** — [WHILE] Iterate PCRS result rows (L291–L299)

> Loops through all rows returned by the price-course query. For each row, if the price course code is non-empty, it is added to the `pcrsMap` mapping the course code to its associated TV course group code.

| # | Type | Code |
|---|------|------|
| 1 | WHILE | `while (null != pcrsCdMap)` // Iterates until no more rows |
| 2 | IF | `if(!"".equals(JBSbatStringUtil.Rtrim(pcrsCdMap.getString(JBSbatKK_M_PCRS.PCRS_CD))))` // [-> JBSbatKK_M_PCRS.PCRS_CD = "PCRS_CD"] Only process rows where price course code is not empty after trimming |
| 3 | SET | `pcrsMap.put(JBSbatStringUtil.Rtrim(pcrsCdMap.getString(JBSbatKK_M_PCRS.PCRS_CD)), JBSbatStringUtil.Rtrim(pcrsCdMap.getString(JBSbatKK_M_PCRS.TV_COURSE_GRP_CD)));` // Maps PCRS_CD -> TV_COURSE_GRP_CD |
| 4 | SET | `pcrsCdMap = db_KK_M_PCRS.selectNext();` // Fetches the next row |

**Block 12** — [SET] Read file path from common item (L300)

> Retrieves the file path for delayed course-change confirmations from the free-item field of `commonItem`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String filePath = super.commonItem.getFreeItem();` // Gets the CSV file path for delayed course-change confirmations |

**Block 13** — [CALL] Load delayed course-change confirmation list (L301)

> Reads the CSV file at the given path, parsing each line to extract service contract numbers. The numbers are stored in `chTienList` for later use by downstream batch processing.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setChTienList(filePath);` // Reads CSV file and populates chTienList with service contract numbers |

**Block 13.1** — Nested: `setChTienList(filePath)` internals (L2107–2145)

> Sub-block showing the file-reading logic:

| # | Type | Code |
|---|------|------|
| 1 | SET | `chTienList = new ArrayList<String>();` // Initializes the confirmation list |
| 2 | IF | `if (0 == filePath.length())` // [-> Condition: empty file path] |
| 3 | EXEC | `throw new JBSbatBusinessException(JPCBatchMessageConstant.EKKB0130CE, new String[]{"フリー項目：ファイル名"});` // [-> JPCBatchMessageConstant.EKKB0130CE] Throws error if file path is empty |
| 4 | SET | `tmpReader = new JBSbatInputFileUtil(filePath);` // Creates file reader |
| 5 | SET | `tmpReader.setEncode(JKKBatConst.SJIS);` // [-> JKKBatConst.SJIS] Sets character encoding to Shift-JIS |
| 6 | SET | `tmpReader.setLine(JKKStrConst.LINE_LF);` // [-> JKKStrConst.LINE_LF] Sets line terminator to LF |
| 7 | EXEC | `tmpReader.createReader();` // Opens the file |
| 8 | WHILE | `while(null != (line = tmpReader.readLine()))` // Reads each line until EOF |
| 9 | SET | `line = line.replaceAll("\"", "");` // Removes all double-quote characters |
| 10 | SET | `String[] dataList = line.split(JKKBatConst.S_SEP_CAM);` // Splits by comma (,) |
| 11 | IF | `if(null != svcKeiNo)` // [-> svcKeiNo = dataList[0]] Checks for non-null service contract number |
| 12 | SET | `chTienList.add(svcKeiNo);` // Adds the service contract number to the confirmation list |

**Block 14** — [RETURN] End of initialization (L302)

> The method completes. All state has been initialized — DB handles are ready, `prg_grp_cd[]` is populated, `pcrsMap` contains the course-code mapping, and `chTienList` holds the delayed course-change confirmations. The batch transitions to the `execute` method for main processing.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` // Initialization complete; batch proceeds to execute() |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service Contract Number — unique identifier for a telecom service contract in the K-Opticom system |
| `svc_kei_ucwk_no` | Field | Service Contract Detail Number — line-item identifier within a service contract |
| `PCRS_CD` | Field | Price Course Code — identifies a specific pricing plan/course for telecom services |
| `TV_COURSE_GRP_CD` | Field | TV Course Group Code — groups price courses into categories for TV primary/secondary pricing setup |
| `PRC_GRP_CD` | Field | Processing Group Code — categorizes processing groups used in batch routing and filtering |
| `ZM_M_WORK_PARAM_KNRI` | Table | Business Parameter Management Table — stores configurable parameters for batch operations |
| `KK_M_PCRS` | Table | Price Course Master Table — master data defining available pricing courses and their group associations |
| `KK_M_PPLAN_KTTANKA` | Table | Price Plan Fixed Unit Price Table — master data for fixed unit prices within price plans |
| `KK_T_SVC_KEI_UCWK` | Table | Service Contract Details Table — transactional table storing line-item details of service contracts |
| `KK_T_SVC_KEI` | Table | Service Contract Table — parent table for service contract records |
| `KK_T_PRG` | Table | Progress Table — tracks batch processing progress states and timestamps |
| `KK_T_SVKEI_EXC_CTRL` | Table | Service Contract Exception Control Table — manages exception handling and lock control for service contracts |
| `chTienList` | Field | Delayed Course Change Confirmation List — list of service contract numbers that have pending course-change delays |
| `prg_grp_cd` | Field | Processing Group Code Array — array of pricing group codes retrieved from the work parameter table |
| `pcrsMap` | Field | Price Course Code to TV Course Group Code Mapping — HashMap used to look up TV course group codes from price course codes |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| Batch | Business term | Scheduled automated processing run (not real-time screen) that evaluates service contracts for pricing setup |
| 異動区分 (Ido Kumbun) | Field | Movement Division — classification code for the type of contract change (e.g., "00066" for TV contract pricing setup) |
| 進捗ステータス (Shinsho Status) | Field | Progress Status — numeric code indicating the current stage of batch processing ("1430" = TV contract pricing setup complete) |
| eo光テレビ (eo Hikari TV) | Business term | eo Fiber TV — K-Opticom's digital television service bundled with fiber internet |
| 主従料金 (Juju Ryokin) | Business term | Primary/Secondary Pricing — the billing structure where a main service (TV) has associated secondary charges |
| クエリ (Query) | Business term | SQL query — in this context, refers to database retrieval queries against the K-Opticom service contract tables |
| 価格コース (Kakaku Course) | Business term | Price Course — a defined pricing tier for telecom services |
| 課程変更遅延確定 (Katei Henkou Chien Kakutei) | Business term | Delayed Course Change Confirmation — service contracts with course changes that are confirmed but delayed for processing |
| KK_SELECT_093 | SQL Key | SQL definition for service contract details query used in preprocessing |
| KK_SELECT_007 | SQL Key | SQL definition for price course query used in preprocessing |
| KK_SELECT_110 | SQL Key | SQL definition for service contract details query used for contract number retrieval |
| KK_SELECT_002 | SQL Key | SQL definition for work parameter query used to retrieve pricing group codes |
| KK_SELECT_090 | SQL Key | SQL definition key for service contract details query |
| KK_SELECT_023 | SQL Key | SQL definition key for service contract query |
| KK_M_PPLAN_KTTANKA | Table | Price Plan Fixed Unit Price — master data table for price plan unit pricing |
| JBSbatBusinessService | Class | Abstract base class for batch services — provides `setCommonInfo` and common batch infrastructure |
| JBSbatSQLAccess | Class | Database access helper — wraps SQL execution against a specific table with parameter binding |
| JBSbatCommonItem | Class | Batch common parameter envelope — carries shared context (date, connection, free-item fields) across the batch |
