caatm.cpre

来自「商业银行前置系统」· CPRE 代码 · 共 124 行

CPRE
124
字号
/* * This is a part of the Application Preconsole * - Channel Access - ATM. * Copyright (C) 2001-2001 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-12-29 Liang     - ATM */#include <sybtesql.h>#include "ap.h"#include "apca.h"#include "atm.h"EXEC SQL INCLUDE sqlca;#define ASSURE(b) \    { \        if (!VERIFY(b)) \            EXEC CICS RETURN; \    }#define ASSURE_NORMAL(r) ASSURE((r) == NORMAL)/*  * main function */  RESULT main(){            PCOMMAREASTRU pcommareastru;        ATMSTRU atmstru;        char szMsgId[SIZE_MSGID + 1];        bufclr(szMsgId);        EXEC CICS ADDRESS EIB(dfheiptr);    EXEC CICS ADDRESS COMMAREA(pcommareastru);        if (!VERIFY_NULL(pcommareastru) ||        !VERIFY(dfheiptr->eibcalen == sizeof(COMMAREASTRU)))         EXEC CICS RETURN;        ASSURE_NORMAL(GetAtm(&atmstru, pcommareastru->szAddr));                /*     * 获得交易码。     */        VERIFY_NORMAL(ApCaRecord(pcommareastru->cMsg, 			     atol(pcommareastru->szMsgLen),                             "atm", TRUE));        memcpy(szMsgId, pcommareastru->cMsg, SIZE_MSGID);              if (strcmp(szMsgId, "ARQK") == 0)        ASSURE_NORMAL(HandleRqk(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "ACWD") == 0)        ASSURE_NORMAL(HandleCwd(pcommareastru->cMsg,                                 pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "ATFR") == 0)        ASSURE_NORMAL(HandleTfr(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "AINQ") == 0)        ASSURE_NORMAL(HandleInq(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))            else if (strcmp(szMsgId, "ACWC") == 0)        ASSURE_NORMAL(HandleCwc(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "APIN") == 0)        ASSURE_NORMAL(HandlePin(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                         else if (strcmp(szMsgId, "AAEX") == 0)        ASSURE_NORMAL(HandleAex(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "AOEX") == 0)        ASSURE_NORMAL(HandleOex(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "AMSR") == 0)        ASSURE_NORMAL(HandleMsr(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "ARQF") == 0)        ASSURE_NORMAL(HandleRqf(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))                        else if (strcmp(szMsgId, "ARFM") == 0)        ASSURE_NORMAL(HandleRfm(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))            else if (strcmp(szMsgId, "ADEP") == 0)        ASSURE_NORMAL(HandleDep(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))            else if (strcmp(szMsgId, "ADPC") == 0)        ASSURE_NORMAL(HandleDpc(pcommareastru->cMsg,                                pcommareastru->szMsgLen, atmstru))            else        ASSURE_NORMAL(INVALID)        EXEC CICS RETURN;}    /* End of this file */

⌨️ 快捷键说明

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