select input-file assign to "fname" organization is line sequential. ... fd input-file record contains 80 characters. 01 input-file-record pic x(80). ... procedure division. open input input-file. read input-file record. ... close input-file. stop run.
上記プログラムを実行する前に、次のコマンドを発行したとします。
set dd_fname="<cmd /c dir c:\help"
その場合は、READ 操作をinput-fileへ行うと、dirコマンドからの出力行が一行ずつ戻されます。