There's nothing wrong in my response. Strange that no one wanted to point it
out. Your original code snippet was
>&txt setc 'QVSIMGLOGICALPARTITIONNAME'
>&txtk seta k'QVSIMGLOGICALPARTITIONNAME
> MVC 0(&txtk,R4),&txt
1. K' is wrong and L' is correct. Rarely is K' used for determining length in
an MVC and would be ill advised.
2. K' is only valid for macro variables so the SETA above would fail in
assembly because of the text string..
3. Most macro statements can occur in the mainline code without being enclosed
in a MACRO. Clearly, "conditional assembly-statements" are macro statements
because they are documented in part 3 MACRO LANGUAGE of the assembler
reference. I mentioned this in case the OP did not know.
4. The difference in coding on macro statements versus instructions is very
important (case in point is continuation sparking this thread). The behavior of
L' specified on a macro statement is very important distinction (not trivial).
Many programmers code dsects at the end of their source. If you assemble the
following, the SETA will fail but the MVC will be successful. Move TEXT before
SETA and the SETA will be successful
&LEN SETA L'TEXT
MVC 0(L'TEXT,R1),TEXT
TEXT DS CL5
Jon Perryman.
>________________________________
> From: John Gilmore <[email protected]>
>
>
>Jon Perryman wrote:
>
><begin extract>
>Attribute K' should have been L'. Also note that macro statements can
>be used outside a macro's (no MACRO / MEND needed). In addition, macro
>statements are processed different than instructions. In this case,
>the L' should be on the MVC instruction (MVC 0(L'&txt,R4),&TXT)
>because L' on macro statements require the variable be defined prior
>to the SETA statement. When used on an instruction, the variable can
>be anywhere in your in your code
></end extract>
>
>and I am not sure quite what to make of it. Much of it is otiose, and
>some of it is wrong.
>
>In
>
>|&text setc 'Tertium non datur' --initialize &text
>|&textk seta k'&text --get its character count
>
>the k' is correct, and I used it advisedly. (In general, k'<whatever>
>and l'<whatever> are not interchangeable. When a [crude] character
>count is sought k' shopuld be used.)
>
>In general the behavior of conditional-assembly statements is much the
>same inside and and outside macro definitions. There are some obvious
>differences, reflective chiefly of scope; but they are neither very
>important nor very interesting. That they are processed differently
>from each other and from, say, machine instructions and assembler
>instructions is of course correct. That is the point. If they were
>not, they too would be otiose.
>
>John Gilmore, Ashland, MA 01721 - USA