/*
 * PAY_STATUS.pgc - py 모듈 서비스 PAY_STATUS (one service = one file).
 * 지급 상태 조회: dbio 로 단건 상태를 읽어 회신.
 * Moved verbatim from the former inline py_svr.pgc; runs on the caller's XA
 * branch (no EXEC SQL CONNECT). Advertised by py_svr at tpsvrinit.
 */
#include "PAY_STATUS.h"

void PAY_STATUS(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    long payout_id = getl(b, T_ID1);
    char st[4];
    if (pydb_get_status(payout_id, st) < 0) FAIL(b);
    Bchg(b, T_STATUS, 0, st, 0L);
    OK(b);
}
