And if you want to generate your own error - instead of the assembler error, use the DEFINED attribute (i.e., D'&XCODE._Check) to test for ABCD being previously defined.
Bill Hitefield Dino-Software Corporation 800.480.DINO 423.878.5660 www.dino-software.com -----Original Message----- From: IBM Mainframe Assembler List <[email protected]> On Behalf Of Charles Mills Sent: Sunday, March 03, 2019 7:16 PM To: [email protected] Subject: Re: Best practice using Conditional Assembly Not incredibly elegant but I don't know how to do any better. You can't do in conditional assembler what you could do in Rexx, right? In Rexx, given "input" of ABCD you could set ABCD.IsDefined to TRUE and subsequently check it. You can't do that in conditional assembler, can you? Given an input parameter of ABCD, essentially define a LCLB named &XCODE? All conditional symbol names have to be hard-coded in the source code, right? Here's a real easy solution. You may or may not think it elegant. Have the macro generate &XCODE._Check EQU * that is, for example give XCODE=ABCD ABCD_Check EQU * and if it assembles in error, ABCD is a duplicate. Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of MELVYN MALTZ Sent: Sunday, March 3, 2019 3:43 PM To: [email protected] Subject: Re: Best practice using Conditional Assembly Hi Paul, Others will give you code Define an LCLC array Keep a count of entries Before inserting a new entry, scan the array to see if &XCODE is already there If it is...it's a duplicate If not, add it and increment the count
