sysin

Read STDIN (SYSIN) in COBOL

别说谁变了你拦得住时间么 提交于 2019-12-10 12:50:02
问题 I want to read the lines out of STDIN (aka SYSIN) in COBOL. For now I just want to print them out so that I know I've got them. From everything I'm reading it looks like this should work: IDENTIFICATION DIVISION. PROGRAM-ID. APP. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT SYSIN ASSIGN TO DA-S-SYSIN ORGANIZATION LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD SYSIN. 01 ln PIC X(255). 88 EOF VALUE HIGH-VALUES. WORKING-STORAGE SECTION. PROCEDURE DIVISION. OPEN INPUT SYSIN