用COBOL做个小程序

发布网友 发布时间:2022-04-23 09:40

我来回答

2个回答

热心网友 时间:2023-08-06 20:29

IDENTIFICATION DIVISION.
PROGRAM-ID. F1111111.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. HITAC.
OBJECT-COMPUTER. HITAC.
DATA DIVISION.
WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 COPY F401R PREFIXING F401-.
01 COPY F801R PREFIXING F801-.
01 COPY F801R PREFIXING W801-.
01 COPY F010R PREFIXING F010-.
01 COPY F010R PREFIXING W010-.
01 COPY F657R PREFIXING F657-.
01 COPY F657R PREFIXING W657-.
01 COPY F658R PREFIXING F658-.
01 COPY F658R PREFIXING W658-.
01 COPY F811R PREFIXING F811-.
01 COPY F811R PREFIXING W811-.
01 COPY F130R PREFIXING F130-.
01 COPY F122R PREFIXING F122-.
01 COPY F104R PREFIXING F104-.
01 COPY F604R PREFIXING F604-.
01 COPY F166R PREFIXING F166-.
H0000-MAIN SECTION.
H0000-000.
ACCEPT W-DATE FROM DATE.
ACCEPT W-TIME FROM TIME.
PERFORM H1000-MSGGET.
PERFORM SHOKI-SHORI.
PERFORM H3000-PFKEY.
PERFORM MSGSEND-SHORI.
PERFORM H5000-END.
H0000-999.
GOBACK.
H1000-MSGGET SECTION.
H1000-000.
PERFORM MSG-RECEIVE-SHORI.
PERFORM CTS-RECEIVE-SHORI.
H1000-999.
EXIT.
MSG-RECEIVE-SHORI SECTION.
H1100-000.
MOVE SPACE TO F0SABN-IFA.
RECEIVE IN-PCB FIRST SEGMENT INTO XMAP-RECV.
MOVE IN-STAT TO IO-STAT.
MOVE INT-NAME TO IOT-NAME.
IF IO-STAT = '00000'
MOVE OFF-FLAG TO ERR-FLG
W-CTS-FLG
ELSE
MOVE 'DC' TO F0SABN-KBN
MOVE 'RECEIVE' TO F0SABN-DC-FUNC
MOVE 'IO-PCB' TO F0SABN-CD-AREA
MOVE IO-STAT TO F0SABN-DC-STAT
MOVE 'MSG-RECEIVE-SHORI' TO F0SABN-SEC
PERFORM H9100-ABEND
END-IF.
H1100-999.
EXIT.
CTS-RECEIVE-SHORI SECTION.
CTS-RECEIVE-SHORI-000.
MOVE IOT-NAME TO CT-TMPID.
MOVE TAM-RECIVE TO TAM-REQCD.
CALL 'CBLDCTAM' USING TAM-CTRL TAM-FUNC CT-TMPID TAM-REC.
MOVE TAM-REC TO CTS-AREA.
IF CT-STAT NOT = '00000'
IF CT-STAT = '01731'
PERFORM CTS-SEND-SHORI
ELSE
MOVE 'DC' TO F0SABN-KBN
MOVE 'RECEIVE' TO F0SABN-DC-FUNC
MOVE 'CT-PCB' TO F0SABN-CD-AREA
MOVE CT-STAT TO F0SABN-DC-STAT
MOVE 'CTS-RECEIVE-SHORI' TO F0SABN-SEC
PERFORM H9100-ABEND
END-IF
END-IF.
CTS-RECEIVE-SHORI-999.
EXIT.
SHOKI-SHORI SECTION.
SHOKI-SHORI-000.
INITIALIZE WORK-AREA.
INITIALIZE W010-F010R.
MOVE OFF-FLAG TO ERR-FLG.
MOVE FUNCTION CURRENT-DATE TO DATETIME.
MOVE LOW-VALUE TO M081-F0M081G.
MOVE OFF-FLAG TO W401-FLAG.
PERFORM H2100-3FCLR.
MOVE XMAP-CNTRL1 TO M081-CNTRLO.
MOVE M081-F0M081S TO W-IMAP-LENG.
MOVE XMAP-RECV-MAPI TO M081-F0M081I.
MOVE W-IMAP-LENG TO M081-F0M081S.
PERFORM H2200-SPCLR.
MOVE CTS-NOW-PAGE TO W-PG.
MOVE XMAP-SENDT TO XMAP-SEND.
MOVE MAP-ID TO XMAP-SEND-PMAPNAME.
MOVE TRAN-ID TO XMAP-SEND-TRN.
MOVE W-SEND-REQ-INOUT TO XMAP-SEND-REQ.
MOVE 'DSP001 ' TO XMAP-SEND-TNAME.
MOVE W-SYSTEM-DATE TO M081-SYSTEM-DATEO.
MOVE W-SYSTEM-TIME TO M081-SYSTEM-TIMEO.
SHOKI-SHORI-999.
EXIT.

满意的话就采纳吧

热心网友 时间:2023-08-06 20:30

该如何解决,

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com