/*
 * CM_PARAM.pgc - cm 모듈 서비스 CM_PARAM (one service = one file).
 * Split out of the former inline cm_svr.pgc; runs on the caller's XA
 * branch (no EXEC SQL CONNECT). Advertised by cm_svr at tpsvrinit.
 */
#include "CM_PARAM.h"

/* 18. CM_PARAM - 공통 파라미터 조회. */
void CM_PARAM(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    char key[64], val[128];
    gets_(b, T_STR1, key, sizeof(key));
    if (key[0] == 0) FAIL(b);
    if (cmdb_get_param(key, val) < 0) { userlog("CM_PARAM 미존재 key=%s", key); FAIL(b); }
    sets_(b, T_STR3, val);
    OK(b);
}
