000010 IDENTIFICATION DIVISION.
000020************************************************************
000030** SAMPLE PROGRAM **
000040** ファイルの内容を画面に出力する **
000050************************************************************
000060 PROGRAM-ID. YAMAGU.
000070*
000080 ENVIRONMENT DIVISION.
000090 INPUT-OUTPUT SECTION.
000100 FILE-CONTROL.
000110 SELECT WINFILE1 ASSIGN TO FILE01-MSD
000120 ORGANIZATION IS SEQUENTIAL
000130 FILE STATUS WFSTS1.
000140 I-O-CONTROL.
000150 APPLY EXCLUSIVE-MODE ON WINFILE1.
000160*
000170 DATA DIVISION.
000180 FILE SECTION.
000190 FD WINFILE1
000200 BLOCK CONTAINS 256 CHARACTERS
000210 LABEL RECORD IS STANDARD
000220 VALUE OF IDENTIFICATION IS "WINFILE01".
000230 01 WINREC.
000240 02 A1 PIC X(80).
000250 02 A2 PIC X(176).
000260*
000270 WORKING-STORAGE SECTION.
000280 01 WFSTS1 PIC X(02).
000290 01 AFSTS1 PIC X(02).
000300*
000310 01 EFLAG PIC X(03).
000320*
000330 01 IN-P PIC X(01).
000340*
000350 SCREEN SECTION.
000360 SD GAMEN END STATUS IS ENDSTS.
000370 01 DSP-SUP.
000380** スクロール範囲2-24 上スクロールする
000390 05 LINE 1.
000400 10 COLUMN 1 PIC X(10) VALUE ""27C1"0224".
000410 10 COLUMN 1 PIC X(10) VALUE ""27C6"01".
000420 01 ACP-PAUSE.
000430 05 LINE 1.
000440 10 COLUMN 60 PIC X(01) USING IN-P.
000450 01 DSP-LINE.
000460 05 LINE 24.
000470 10 COLUMN 1 PIC X(80) FROM A1.
000480*
000490 PROCEDURE DIVISION.
000500************************************************
000510** EFLAG = "LOP" .... READ NEXT DATA
000520** = "END" .... READ END
000530************************************************
000540 MPROG.
000550 OPEN INPUT WINFILE1
000560 MOVE "LOP" TO EFLAG.
000570 PERFORM UNTIL EFLAG = "END"
000580 READ WINFILE1
000590 AT END
000600 MOVE "END" TO EFLAG
000610 NOT AT END
000620 DISPLAY DSP-SUP
000630 DISPLAY DSP-LINE
000640 END-READ
000650 END-PERFORM.
000660 CLOSE WINFILE1
000670** 全部画面表示終わったら入力待ちする
000680 ACCEPT ACP-PAUSE.
000690 STOP RUN.
|