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

📄 sp010201.cpre

📁 商业银行前置系统
💻 CPRE
字号:
/* * This is a part of the Application Preconsole * - Service Provide - ABIS. * Copyright (C) 2000-2000 ABC.SDC. * All rights reserved. * * This source code is only intended as a supplement to the * Application Preconsole Reference and related * electronic documentation provided with the library. * See these sources for detailed information regarding the * Application Preconsole product.  * * Update record: * 2001-11-17 whl     - create implementation file for cics *                      program of save service - 查询余额 */#include <sybtesql.h>#include "ap.h"#include "apsc.h"#include "abisemu.h"EXEC SQL INCLUDE sqlca;/* * Main function */void main(){    TIASTRU tiastru;    TOASTRU toastru;    char szBal[AP_LEN_BAL + 1];    char cCommArea[3000];    unsigned long lRespCode;        PXMLSTRU pxmlstruResp;    PXMLSTRU pxmlstruReq;        memset(&tiastru, 0, sizeof(tiastru));    memset(&toastru, 0, sizeof(toastru));    if (!VERIFY_NULL(pxmlstruResp = ApScGetRespXml()) ||        !VERIFY_NULL(pxmlstruReq = ApScGetReqXml()))        EXEC CICS RETURN;    AP_DEMAND_EXT(AP_PATH_SEQNO, tiastru.szSeqNo);    AP_DEMAND(AP_PATH_ACCPWD, tiastru.szAccPwd);            if (!VERIFY_NORMAL(AP_DEMAND(AP_PATH_ACCNO, tiastru.szAccNo)))    {        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_LOGERR);        EXEC CICS RETURN;    }    tiastru.nTransCode = 201;            bufclr(cCommArea);    tprintf(cCommArea, FMT_TIA, VAR_TIA);        PrintLog(stderr, "Linking ABIS...");    EXEC CICS ADDRESS EIB(dfheiptr);    EXEC CICS LINK PROGRAM("S051") COMMAREA(cCommArea)              LENGTH(sizeof(cCommArea)) SYNCONRETURN RESP(lRespCode);                 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;    }        sprintf(szBal, "%19.2lf", toastru.dBal);    if (!VERIFY_NORMAL(AP_INSERT(AP_PATH_BAL, szBal)))    {        ApUpdateRespCode(pxmlstruResp, AP_RESPCODE_EXCEPTION);        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 + -