I’ve recently added a video that covers COM control sections – an old idea that’s interesting to try. If your program consists of multiple CSECTs, you can create a COM section – an uninitialized storage area that becomes part of the object module – and which can be shared selectively among the CSECTs that comprise the program. You can find the video here and some sample code to play with here. There’s also links to these items in the Video Course.
New Video: Using COM Control Sections
Filed under IBM Mainframe Assembler
3 responses to “New Video: Using COM Control Sections”
Punctilious? This comment in the source is not:
L R11,=A(MYCOM) POINT R12 TO THE COMMON AREA
NORENT assembler coding is EVIL and the STORAGE macro is your friend.
Punctilious is only a goal that I struggle to achieve. Thanks for pointing out the error. I’ll correct it.
Bravo! Another fascinating article on a seldom seen feature of Assembler which has been around since at least System/360 and still carries on even today – the COM instruction:
http://bit.ly/3poQu9u – In Assembler Language Ref (C28-6514 1967) p. 26
http://ibm.co/3jSaSP8 – In HLASM 1.6 Language Ref in Knowledge Center
A couple of aspects not covered in the video which I discovered by playing around with it (see source below).
(1) Using the name field, you can have multiple COM sections in a source program. “A” and “B” below are separate COM sections.
(2) Much like CSECT and DSECT, if you reuse a previous COM section name with a subsequent COM section, the previous COM section is continued. Fields “A1” and “A2” below are contiguous bytes in the same COM section (“A”).
(3) COM sections always align on a double-word boundary. Using the source below, the assembler will insert slack bytes after COM “A” so as to align COM section “B” on a double-word boundary.
A1 DS C
B1 DS C
A2 DS C