다양화 Wave2: dbio 289 + common 120 고유화 + 프로그램 206개 EXEC SQL 심화
- dbio io(289): fetch/touch/total 시그니처 유지, SQL 바디를 JOIN/집계/커서/ upsert/DELETE 등 구조로 고유화 → 289/289 고유 - common cu(120): 유틸 시그니처 유지, Luhn/CRC/Zeller/BIN레인지/amortization/ netting 등 실 알고리즘으로 고유화 → 120/120 고유 - 심화: 실제 EXEC SQL 없던 프로그램에 SELECT/INSERT/UPDATE/커서+tx 추가 → online+batch 530/530 전부 실제 SQL 보유 - 전 코퍼스 프로그램 939/939 고유, 전체 docker make -j4 = EXIT 0, 958 오브젝트 - 임시 생성기 제거, inventory.json loc 실측 갱신 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c3a0259e95
commit
93c3cb74af
1111 changed files with 31539 additions and 17258 deletions
|
|
@ -28,6 +28,13 @@ EXEC SQL INCLUDE sqlca;
|
|||
|
||||
TX_SERVICE(CL_OL_0023, ctx)
|
||||
{
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char h_biz_date[9];
|
||||
char h_st_done[2];
|
||||
long h_db_used;
|
||||
char h_max_key[16];
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
||||
char bizdate[16];
|
||||
char reqid[32];
|
||||
char channel[16];
|
||||
|
|
@ -86,6 +93,30 @@ TX_SERVICE(CL_OL_0023, ctx)
|
|||
* - 가용 여력(avail)은 일 상한(cap)에서 소진수를 뺀 값이며
|
||||
* 음수가 되지 않도록 0 하한으로 보정한다.
|
||||
*/
|
||||
/*
|
||||
* 2-1) 원장 직접 집계로 소진수(마감완료 M)를 재확인하고, 이미 발급된
|
||||
* 최대 처리키를 조회하여 채번 연속성의 근거로 삼는다.
|
||||
*/
|
||||
strncpy(h_biz_date, bizdate, sizeof(h_biz_date) - 1);
|
||||
h_biz_date[sizeof(h_biz_date) - 1] = '\0';
|
||||
strncpy(h_st_done, CL_ST_DONE, sizeof(h_st_done));
|
||||
h_db_used = 0;
|
||||
h_max_key[0] = '\0';
|
||||
|
||||
EXEC SQL SELECT count(*), coalesce(max(key), '')
|
||||
INTO :h_db_used, :h_max_key
|
||||
FROM cl_ledger
|
||||
WHERE biz_date = :h_biz_date
|
||||
AND status = :h_st_done;
|
||||
|
||||
if (sqlca.sqlcode != TX_SQL_OK && sqlca.sqlcode != TX_SQL_NOTFOUND) {
|
||||
TX_DBIO_LOG_ERR("CL_OL_0023 direct used");
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_SYSERR);
|
||||
tx_return(ctx, TX_EDB, ctx->out);
|
||||
return;
|
||||
}
|
||||
|
||||
next_no = done_cnt + 1;
|
||||
avail = (cap > done_cnt) ? (cap - done_cnt) : 0;
|
||||
usage_rate = (cap > 0) ? (done_cnt * 100 / cap) : 0;
|
||||
|
|
@ -102,6 +133,8 @@ TX_SERVICE(CL_OL_0023, ctx)
|
|||
tx_buf_sets(ctx->out, "REQID", reqid);
|
||||
tx_buf_sets(ctx->out, "CHANNEL", channel);
|
||||
tx_buf_setlong(ctx->out, "USEDCNT", done_cnt);
|
||||
tx_buf_setlong(ctx->out, "DBUSED", h_db_used);
|
||||
tx_buf_sets(ctx->out, "MAXKEY", h_max_key);
|
||||
tx_buf_setlong(ctx->out, "RECVCNT", recv_cnt);
|
||||
tx_buf_setlong(ctx->out, "SETTLEDCNT", settled_cnt);
|
||||
tx_buf_setlong(ctx->out, "CAP", cap);
|
||||
|
|
|
|||
Reference in a new issue