⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sp040802.cpre

📁 商业银行前置系统
💻 CPRE
字号:
/* * This is a part of the Applictiaon Preconsole * - Service Provide - MSI. * Copyright (C) 2000-2000 ABC.SDC. * All rights reserved. * * This source code is only intended as a supplement to the * Applictiaon Preconsole Reference and related * electronic documenttiaon provided with the library. * See these sources for detailed informtiaon regarding the * Applictiaon Preconsole product.  * * Update record: * 2001-11-17 whl     - create implementtiaon file for cics *                      program of msi service - 电话交费 */#include <sybtesql.h>#include "ap.h"#include "apsc.h"#include "msi.h"EXEC SQL INCLUDE sqlca;/* * Main function */void main(){    TIASTRU tiastru;    TOASTRU toastru;    char szBal[AP_LEN_BAL + 1];    char szAmt[AP_LEN_AMT + 1];    char szMsgType[AP_LEN_MSGTYPE + 1];    char cCommArea[3000];    unsigned long lRespCode;        PXMLSTRU pxmlstruResp;    PXMLSTRU pxmlstruReq;        memset(&tiastru, 0, sizeof(tiastru));    if (!VERIFY_NULL(pxmlstruResp = ApScGetRespXml()) ||        !VERIFY_NULL(pxmlstruReq = ApScGetReqXml()))        EXEC CICS RETURN;    AP_DEMAND(AP_PATH_MSGTYPE, szMsgType);    if (strcmp(szMsgType, AP_MSGTYPE_CANCELREQ) == 0)        tiastru.sTranFlag = 1;            else if (strcmp(szMsgType, AP_MSGTYPE_SUBMITREQ) == 0)        tiastru.sTranFlag = 0;    else    {        VERIFY(FALSE);        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_LOGERR);        EXEC CICS RETURN;    }        AP_DEMAND(AP_PATH_COLLECTMON, tiastru.szMonth);    AP_DEMAND(AP_PATH_AMT, szAmt);    tiastru.dAmt = atof(szAmt);        if (!VERIFY_NORMAL(AP_DEMAND(AP_PATH_PHONENO, tiastru.szPhoneNo)))    {        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_LOGERR);        EXEC CICS RETURN;    }    tiastru.nTransCode = 802;            bufclr(cCommArea);    tprintf(cCommArea, FMT_TIA, VAR_TIA);        PrintLog(stderr, "Linking AT...");    EXEC CICS ADDRESS EIB(dfheiptr);    EXEC CICS LINK PROGRAM("S053") COMMAREA(cCommArea)              LENGTH(sizeof(cCommArea)) SYNCONRETURN RESP(lRespCode);                 if (!VERIFY(lRespCode != DFHRESP(ROLLEDBACK)))    {        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_EXCEPTION);        EXEC CICS RETURN;    }    if (!VERIFY(lRespCode == DFHRESP(NORMAL)))    {        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_SYSERR);        EXEC CICS RETURN;    }    tscanf(cCommArea, FMT_TOA, VAR_TOA);    if (toastru.cRespType != 'N')    {        ApUpdateRespCode(pxmlstruResp, toastru.szErrCode);        EXEC CICS RETURN;    }    ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_ACCEPT);    EXEC CICS RETURN;}/* End of this file */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -