On Sun, 9 Jun 2024 17:29:22 -0500, Janko Kalinic <[email protected]> wrote:
> 3 &NAME M$TX &TEXT Handling of variables on the macro prototype statement is different than SETC. Quoting is one of the peculiarities. > 6 &NAME DC AL2(&A,0),C&TEXT > 11+USFG81 DC AL2(25,0),C'X''08'' PDSE DATA SET' You know that &TEXT is not considered a quoted variable because C&TEXT retained the leading/trailing quotes instead of dropping them. > 5 &A SETA K'&TEXT-2+4 Using K' is not an acceptable solution for this problem because the count does not always match the length of the constant. There are multiple solutions. If I remember correctly, you can use DCLEN(C&TEXT) but when dealing with less experienced programmers, I suggest using something like the following because your intentions are obvious in the listing & it guarantees you are not impacted by MACRO quirks. &NAME M$TX &TEXT &NAME DC AL2(&NAME._E-&NAME,0),C&TEXT &NAME._E EQU *
