better way? C language x'00' delimited string.

2016-06-27 Thread John McKown
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?

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


Re: better way? C language x'00' delimited string.

2016-06-27 Thread zMan
Use a macro.

On Mon, Jun 27, 2016 at 9:04 AM, 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?
>
> --
> "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
>



-- 
zMan -- "I've got a mainframe and I'm not afraid to use it"


Re: better way? C language x'00' delimited string.

2016-06-27 Thread Gord Tomlin

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


Re: better way? C language x'00' delimited string.

2016-06-27 Thread John McKown
On Mon, Jun 27, 2016 at 8:39 AM, Gord Tomlin <
gt.ibm.li...@actionsoftware.com> 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


Re: better way? C language x'00' delimited string.

2016-06-27 Thread Ze'ev Atlas
Then you have no choice but nldelstr as your macro name  :) ... or should I say 
:(Za

Sent from Yahoo Mail on Android 
 
  On Mon, Jun 27, 2016 at 10:16 AM, John McKown 
wrote:   On Mon, Jun 27, 2016 at 8:39 AM, Gord Tomlin <
gt.ibm.li...@actionsoftware.com> 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  


Re: better way? C language x'00' delimited string.

2016-06-27 Thread John McKown
On Mon, Jun 27, 2016 at 9:36 AM, Ze'ev Atlas <
01774d97d104-dmarc-requ...@listserv.uga.edu> wrote:

> Then you have no choice but nldelstr as your macro name  :) ... or should
> I say :(Za
>
> Sent from Yahoo Mail on Android
>
>
​Oh, a "name that macro!" contest. Yours has the plus of being 8
characters. I submit NULLCSTR​

​and DCT0x00 ​
​(Define Constant Trailing 0x00 - the C language hex constant for x'00')


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


Re: better way? C language x'00' delimited string.

2016-06-27 Thread Tony Thigpen

CplusX00

Tony Thigpen

John McKown wrote on 06/27/2016 11:20 AM:

On Mon, Jun 27, 2016 at 9:36 AM, Ze'ev Atlas <
01774d97d104-dmarc-requ...@listserv.uga.edu> wrote:


Then you have no choice but nldelstr as your macro name  :) ... or should
I say :(Za

Sent from Yahoo Mail on Android



​Oh, a "name that macro!" contest. Yours has the plus of being 8
characters. I submit NULLCSTR​

​and DCT0x00 ​
​(Define Constant Trailing 0x00 - the C language hex constant for x'00')




Re: better way? C language x'00' delimited string.

2016-06-27 Thread Martin Truebner
John,

I use  

STRING_with_term   DC C'this is a string',X'0'

it has the wrong length attribute (one less) but is easier to decipher
than a macro.

Martin


Re: better way? C language x'00' delimited string.

2016-06-27 Thread John McKown
On Mon, Jun 27, 2016 at 11:14 AM, Martin Truebner 
wrote:

> John,
>
> I use
>
> STRING_with_term   DC C'this is a string',X'0'
>
> it has the wrong length attribute (one less) but is easier to decipher
> than a macro.
>

​I was too. But the wrong length just didn't sit well with me. That's where
I defined &NULL as a SETC symbol with a BYTE(00) and did DC C'this is a
string&NULL'. I'm just looking for alternatives. What I'd really like for
HLASM to have a CZ operand which automatically added the x'00' to the end,
padded short strings with all x'00', and issued an error if you used a
length which was too small to include the ending x'00'

E.g. DC CZ'ABC' would be of length 4, encoded as C1C2C300. DC CZL3'ABC'
would get at least a warning and truncate like C'...' does. DC CZL3'A'
would encode as C1.

I'm not putting in a RFE because I doubt that it is that useful to others.
Also, the time & talent could probably be better spend in other areas of
improvement.



>
> Martin


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


Looking for a software engineering position

2016-06-27 Thread Kerry Paulin
I am looking for a software development position. I've spent most of my career 
working for IBM to help design and develop IBM's products, including DB2, RACF, 
and z/OS Unix. I have an extensive background developing security products, and 
I have worked in many languages, including assembler, COBOL, C, C++, Java, and 
J2EE. I love to develop critical, leading-edge products, but I have worked in 
maintenance as well. I've won several awards that are recognized industry-wide, 
including, most recently, a deputy commissioner award.

I am currently living in the Northwest and would love to continue living on the 
West coast. However, I would be willing to move. Remote work would be ideal. I 
am looking for either permanent or contract work. 

My profile is out on linkedin.

Sincerely,
Kerry Paulin