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.
If, before running the above program, the following command is issued:
set dd_fname="<cmd /c dir c:\help"
then each READ operation on input-file returns the next line of output from the dir command.