:
01 BHDL-PARA.
02 BHDL-MODE PIC X(8).
02 BHDL-ACCMODE PIC 9(2).
02 BHDL-ACCADR PIC 9(10) BINARY.
02 BHDL-NACCADR PIC 9(10) BINARY.
02 BHDL-ACCSIZ PIC 9(5) BINARY.
02 BHDL-EXLMODE PIC X(1).
02 BHDL-PCHK PIC X(1).
02 FILLER PIC X(16) VALUE LOW-VALUE.
02 FILLER PIC X(8) VALUE LOW-VALUE.
02 FILLER PIC X(8) VALUE LOW-VALUE.
02 BHDL-ESIZ PIC 9(10) BINARY.
02 BHDL-RTNCD1 PIC 9(4) BINARY.
02 BHDL-RTNCD2 PIC 9(4) BINARY.
02 FILLER PIC X(16) VALUE LOW-VALUE.
01 BHDL-PATAREA.
02 BHDL-PATLNG PIC 9(5) BINARY.
02 BHDL-ENTKIND PIC X(8).
02 BHDL-PATNM PIC X(260).
01 BHDL-WORK.
02 FILLER PIC X(256) VALUE LOW-VALUE.
02 FILLER PIC X(16) VALUE LOW-VALUE.
02 FILLER PIC X(32) VALUE LOW-VALUE.
02 FILLER PIC X(512) VALUE LOW-VALUE.
01 BHDL-RWBUF.
02 FILLER PIC X(512) VALUE LOW-VALUE.
:
PROCEDURE DIVISION.
:
*=================================================================
* OPEN処理
*=================================================================
MOVE "OPEN" TO BHDL-MODE.
MOVE 10 TO BHDL-PATLNG.
MOVE "C:/A/B/C/D" TO BHDL-PATNM.
MOVE "02" TO BHDL-ACCMODE.
MOVE "S" TO BHDL-EXLMODE.
MOVE "Y" TO BHDL-PCHK.
MOVE "TFILE" TO BHDL-ENTKIND.
CALL "XTSOBHDL" USING BHDL-PARA BHDL-PATAREA
BHDL-WORK.
:
*=================================================================
* READ処理
*=================================================================
MOVE "READ" TO BHDL-MODE.
CALL "XTSOBHDL" USING BHDL-PARA BHDL-PATAREA
BHDL-WORK BHDL-RWBUF.
:
*=================================================================
* WRITE処理
*=================================================================
MOVE "WRITE" TO BHDL-MODE.
CALL "XTSOBHDL" USING BHDL-PARA BHDL-PATAREA
BHDL-WORK BHDL-RWBUF.
:
*=================================================================
* FLUSH処理
*=================================================================
MOVE "FLUSH" TO BHDL-MODE.
CALL "XTSOBHDL" USING BHDL-PARA BHDL-PATAREA
BHDL-WORK.
:
*=================================================================
* CLOSE処理
*=================================================================
MOVE "CLOSE" TO BHDL-MODE.
CALL "XTSOBHDL" USING BHDL-PARA BHDL-PATAREA
BHDL-WORK.
: |