Implement dynamic streams - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

Implement dynamic streams

ABL already supports stream-handles to access statically defined streams in a more dynamic way. But there is no way to instantiate a stream dynamically. Or to check dynamically in what mode the stream is currently open etc.)

It would be good if there was a stream object that a) can be instantiated dynamically and b) can be used to expose the current state of the stream.

The dynamic instantiation can be useful when you need to create an arbitrary set of files, where it is more efficient to write the files in parallel, but you do not know the number of files to create up-front. For example, if you need to dump the results of a single query into multiple files, but not all files are required all the time.

  • Just noticed 11.7+ already have the Progress.IO.FileInputStream / Progress.IO.FileOutputStream abstract classes (and children with concrete implementations). Looks like those already go a long way to achieving this.

    However it would be really valuable if the traditional INPUT FROM / OUTPUT TO / IMPORT / EXPORT etc. would be updated so those can use these classes as streams as well (In addition to the current STREAM  / STREAM-HANDLE options). Would allow adopting them more easily without having to rewrite a lot of existing code.