On 2016-06-27 09:04, John McKown wrote:
COBOL has succumbed to C interface by offering the Z'Character String'
which automatically puts a x'00' at the end. I want to do this in HLASM.
Originally, I did:


STRING DS CL7
     ORG STRING
       DC CL6'HELPME'
       DC X'00'

But that is really odoriferous. So now I do:

&NULL SETC BYTE(00)
STRING DC 'HELPME&NULL'

Not quite as pungent, but better. Does anybody have a better way? Should I
just make a macro, perhaps DCZ, to do the above for me automatically?

This is more a technique question than a technical one. What would be more
understandable to most HLASM programmers?


I'd say use a macro, and use a name for the macro that advertises what the macro generates. IMHO something like CSTRING would be more descriptive than DCZ.

--

Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507

Reply via email to