I think you are SOL on that last argument format (“=(yyyy,mm,dd)”), it just isn’t kosher. Use your second format (“(=,yyyy,mm,dd)”) if at all politically feasible.
Peter From: IBM Mainframe Assembler List <[email protected]> On Behalf Of David Eisenberg Sent: Tuesday, August 1, 2023 4:40 PM To: [email protected] Subject: Macros: sublists question 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 -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.
