Yes, it can be done and I've seen it done.
You can even get rid of Copy Replacing statements and when a copybook is stated 
twice, having to use the OF clause with every operation using these fields.

You can use macros instead of copybooks.  It's actually cleaner than using 
those stupid OF clauses on everything.
What you have to do is take your source code, run it thru HLASM first and have 
it PUNCH out code, then take the output from HLASM and run it into the 
compiler.  It looks weird, because it looks like your trying to assemble a 
cobol program, but what you are doing to using conditional assembly statements 
and using macros instead of copybooks.  It works pretty well.

Thanks,
Tom Savor
E-Mail: [email protected]
�

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Patrick Roehl
Sent: Thursday, November 17, 2011 12:30 PM
To: [email protected]
Subject: Conditional “Assembly” for COBOL?

I’d like to be able to build various versions of a COBOL program by doing
something like a conditional assembly.  Has anyone does anything like this?

Is it possible to add AIF statements to non-assembler source, “assemble
it,” and get the constructed source?  Obviously trying to assemble the
result would be pointless, but can the constructed source be captured
somehow?

I’ve considered doing this with Rexx, but wonder if someone else has tried
to solve this.  All suggestions are welcome.

_____________
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.

Reply via email to