"IBM Mainframe Assembler List" <[email protected]> wrote on 
04/01/2022 11:52:54 AM:
> What I'm wondering is, is there a reasonable way to have HLASM 
> inline the code?
> 
> I mean, the code would be written as:
> 
> Instruction
> Instruction
> * here's where I want to insert ROUTINE_A
> Instruction
> 
>  :
>  :
> 
> ROUTINE_A EQU *
> Routine A's instructions
> *end of routine A
> 
> But it would assemble routine A in the place in the instruction 
> stream where it was "called".


        Essentially, what you're describing is what I call a "code 
snippet" and I put such things in a copybook.  Thus, they would always be 
used in-line no matter how many times they were included in the program 
source.  As an alternative, to reduce program size, you can wrap the same 
copybook with subroutine code in order to formally "call" it from multiple 
places in the program.  Thus, the same copybook can serve in two different 
ways.

        However, I do understand the "loss" of being able to maintain the 
code snippet in the same source code member.  The code copybook would have 
to be maintained as a separate member.  The alternative is to make the 
code snippet into a macro and leave the macro source in the main program 
source so that they can be maintained together in a single member.


Sincerely,

Dave Clark
-- 
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331




*********************************************************************************************
This email message and any attachments is for use only by the named 
addressee(s) and may contain confidential, privileged and/or proprietary 
information. If you have received this message in error, please 
immediately notify the sender and delete and destroy the message and all 
copies. All unauthorized direct or indirect use or disclosure of this 
message is strictly prohibited. No right to confidentiality or privilege 
is waived or lost by any error in transmission. 
*********************************************************************************************

Reply via email to