다양화 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
|
|
@ -106,6 +106,27 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
TX_SERVICE(CL_OL_0023, ctx)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#line 32 "app/online/cl_ol_0023.pgc"
|
||||
char h_biz_date [ 9 ] ;
|
||||
|
||||
#line 33 "app/online/cl_ol_0023.pgc"
|
||||
char h_st_done [ 2 ] ;
|
||||
|
||||
#line 34 "app/online/cl_ol_0023.pgc"
|
||||
long h_db_used ;
|
||||
|
||||
#line 35 "app/online/cl_ol_0023.pgc"
|
||||
char h_max_key [ 16 ] ;
|
||||
/* exec sql end declare section */
|
||||
#line 36 "app/online/cl_ol_0023.pgc"
|
||||
|
||||
|
||||
char bizdate[16];
|
||||
char reqid[32];
|
||||
char channel[16];
|
||||
|
|
@ -164,6 +185,36 @@ 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';
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select count ( * ) , coalesce ( max ( key ) , '' ) from cl_ledger where biz_date = $1 and status = $2 ",
|
||||
ECPGt_char,(h_biz_date),(long)9,(long)1,(9)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_st_done),(long)2,(long)1,(2)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
|
||||
ECPGt_long,&(h_db_used),(long)1,(long)1,sizeof(long),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_max_key),(long)16,(long)1,(16)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
|
||||
#line 110 "app/online/cl_ol_0023.pgc"
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -180,6 +231,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