I haven't been dealing with HLASM for a few years, and I know
that the new kids wanted certain new features....
But look at this from the Macro Processor's viewpoint:
AAA m=(1,2,,3),=(a,b,c)
Which one is a "macro" name (or mnemonic) and then which is a
keyword and which one is positional?
The second one "=(a,b,c)" is missing the keyword.
So that statement should be flagged with an error. At least, I
would expect that.
Steve Thompson
On 8/1/2023 4:39 PM, David Eisenberg wrote:
I hope someone can help me; I have a macro assembler question.
Suppose I write a macro MYMAC receiving two positional parameters:
&TAG MYMAC &DATE1,&DATE2
The macro will do some date arithmetic. If I invoke the macro this way:
MYMAC (2023,7,31),(2024,1,15) two dates (year,month,day)
then IIUC, &DATE1 and &DATE2 are both sublists. I therefore have no trouble
coding SETA statements so that I can reference the year, month, and day values
individually.
Now suppose I wish to modify the macro parameter syntax by requiring an equals
sign in front of one of the dates (because I need to handle certain dates
differently). E.g.:
MYMAC (2023,7,31),(=,2024,1,15)
Again, this is simple: I can check for the equals sign and extract the numeric
values from the appropriate positions in each sublist.
However... suppose I want to allow this syntax:
MYMAC (2023,7,31),=(2024,1,15)
in which the equals sign precedes a date, but is *outside* of the parentheses. Now
IIUC, &DATE2 is no longer a sublist. This instruction:
&YMD2 SETC '&DATE2'(2,*)
sets &YMD2 to the string (2024,1,15) which *looks* like a sublist, but of course
it’s not. Maybe I'm on the wrong track. Bottom line: in my last example, I can’t figure
out how to extract the year, month, and day values from &DATE2 so that I can
reference them separately.
I apologize if this is basic stuff... I would really appreciate the help!
Thanks,
David