To launch a process and write data to its standard input, the filename must consist of the > sign followed by the name of the command. The file should be opened for output.
For example:
select output-file assign to ">cmd /c sort" organization is line sequential. fd output-file. 01 output-file-record pic x(10). procedure division. open output output-file write output-file-record from "Charles" write output-file-record from "Bill" write output-file-record from "Alan" close output-file.