다양화 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:
forge-bot 2026-07-19 04:54:59 +00:00
parent c3a0259e95
commit 93c3cb74af
1111 changed files with 31539 additions and 17258 deletions

View file

@ -12,13 +12,14 @@
*
* (AMOUNT) // ()
* (: 123000000 -> "일억이천삼백만") . /
* . DB .
* (ATMI void SVC(TPSVCINFO*) )
* . (cm_amt_hangeul_log)
* . (ATMI void SVC(TPSVCINFO*) )
*/
#include <stdio.h>
#include <string.h>
#include "txcore.h"
#include "txcore_dbio.h"
#include "acq_util.h"
#include "cm_core.h"
@ -91,7 +92,7 @@ struct sqlca_t *ECPGget_sqlca(void);
#endif
#line 17 "app/online/cm_ol_0020.pgc"
#line 18 "app/online/cm_ol_0020.pgc"
/* 0~9999 한 절(節)을 천/백/십 단위 한글로 변환하여 out 에 누적 */
@ -122,12 +123,26 @@ static void hangeul_group(int val, char *out, int outlen)
TX_SERVICE(CM_OL_0020, ctx)
{
static const char *GUNIT[4] = { "", "", "", "" };
/* exec sql begin declare section */
#line 50 "app/online/cm_ol_0020.pgc"
long h_amount ;
#line 51 "app/online/cm_ol_0020.pgc"
char h_hangeul [ 128 ] ;
/* exec sql end declare section */
#line 52 "app/online/cm_ol_0020.pgc"
char hangeul[128];
char won_fmt[48];
long amount = 0;
long n;
long logged = 0;
int neg = 0;
int g;
int groups[4];
int i;
@ -170,10 +185,36 @@ TX_SERVICE(CM_OL_0020, ctx)
/* 교차표시용: 콤마 구분 숫자표기 */
amount_format_won(amount, won_fmt, sizeof(won_fmt));
/* 변환 결과 증서 감사이력 적재 */
h_amount = amount;
strncpy(h_hangeul, hangeul, sizeof(h_hangeul) - 1);
h_hangeul[sizeof(h_hangeul) - 1] = '\0';
if (tx_begin() != TX_OK) {
tx_log(TX_LOG_WARN, "[CM_OL_0020] tx_begin 경고");
} else {
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into cm_amt_hangeul_log ( amount , hangeul_txt , conv_ts ) values ( $1 , $2 , now ( ) )",
ECPGt_long,&(h_amount),(long)1,(long)1,sizeof(long),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(h_hangeul),(long)128,(long)1,(128)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
#line 112 "app/online/cm_ol_0020.pgc"
if (sqlca.sqlcode != TX_SQL_OK) {
TX_DBIO_LOG_ERR("CM_OL_0020 INSERT cm_amt_hangeul_log");
tx_abort();
} else {
logged = (long)sqlca.sqlerrd[2];
tx_commit();
}
}
tx_buf_reset(ctx->out);
tx_buf_setlong(ctx->out, "AMOUNT", amount);
tx_buf_sets(ctx->out, "HANGEUL", hangeul);
tx_buf_sets(ctx->out, "WON", won_fmt);
tx_buf_setlong(ctx->out, "LOGGED", logged);
tx_log(TX_LOG_INFO, "[CM_OL_0020] 변환완료 amount=%ld -> %s", amount, hangeul);
tx_return(ctx, TX_OK, ctx->out);
}