by willy jensen » Sat Jan 25, 2020 12:53 pm
Possible, yes, but complicated.
In assembler I would do something like
test/wait for some agreed-upon resource name then enqueue the resource
open the dataset with the EXTEND option (this allows allocation with disp=shr and still act as if disp=mod was specified)
write
close
dequeue the resource
You need the open and close to flush buffers.
This will be horribly inefficient, but should be safe. And I have no idea if enqueue/dequeue is avaiable for a COBOL program or if the EXTEND option can be used in a COBOL OPEN.
I will much recommend that the programs write to seperate datasets, with a timestamp so that they can be merged afterwards.