[Info-vax] Fun trick

Arne Vajhøj arne at vajhoej.dk
Sun Feb 2 20:37:50 EST 2025


On 2/2/2025 8:30 PM, Arne Vajhøj wrote:
 > On 1/14/2025 11:06 AM, Arne Vajhøj wrote:
 >> On 1/13/2025 9:11 PM, John Reagan wrote:
 >>> COBOL paragraphs behave like C.  First routine/PARAGRAPH gets a WEAK
 >>> transfer address.  Linker finds the first one.
 >>
 >> I have many prejudices about COBOL developers.
 >>
 >> One of them is that they don't create shareable images.
 >>
 >> :-)
 >
 > But let us say that someone wanted to create a shareable
 > image in Cobol.
 >
 > A typical Cobol program just have all the paragraphs that
 > get performed and they share state. Simple.
 >
 > To make them entry points with arguments in a shareable image,
 > then I assume one need to make them programs with linkage section
 > and procedure division using.
 >
 > Normal variables are just passed as arguments. Seems entirely
 > unproblematic to me.
 >
 > But how does one share open files between modules?
 >
 > Fortran and Basic numeric identifiers work across modules.
 > Pascal can share via inherit. C can use global variables
 > or just pass as argument.
 >
 > But how does one do that in Cobol?
 >
 > Can one mark an fd as global or can one pass a fd as argument?

Did some reading.

IS GLOBAL in one module and IS EXTERNAL in the other modules?

Arne



More information about the Info-vax mailing list