On Mon, Jun 27, 2016 at 8:39 AM, Gord Tomlin <
[email protected]> wrote:

> 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.
>

​Thanks for the CSTRING name. It is better: more descriptive​ and less
likely to be used for something else by IBM.



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



-- 
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

>From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

Reply via email to